-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
56 lines (54 loc) · 1.65 KB
/
flake.nix
File metadata and controls
56 lines (54 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
outputs = {
flake-parts,
self,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
./hosts/flake-module.nix
./home/flake-module.nix
];
systems = ["aarch64-darwin"];
perSystem = {pkgs, ...}: {
apps.default = {
type = "app";
program = toString (pkgs.writeShellScript "install" ''
set -euo pipefail
HOSTNAME=''${1:-$(hostname -s)}
sudo nix --extra-experimental-features 'nix-command flakes' run nix-darwin -- switch --flake "${self}#$HOSTNAME"
if [ ! -d "$HOME/dotfiles" ]; then
${pkgs.git}/bin/git clone https://github.com/kannapoix/dotfiles.git "$HOME/dotfiles"
fi
'');
};
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli/nix-homebrew";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
nixpkgs-direnv.url = "github:NixOS/nixpkgs/5b5b46259bef947314345ab3f702c56b7788cab8";
};
}