-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
59 lines (52 loc) · 1.42 KB
/
flake.nix
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
57
58
59
{
description = "hydrogen";
nixConfig = {
substituters = [
"https://cache.nixos.org"
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {
self,
home-manager,
nix-darwin,
nixpkgs
}: let
username = "ray";
email = "[email protected]";
system = "aarch64-darwin";
hostname = "hydrogen";
specialArgs =
inputs
// {
inherit username email hostname;
};
in {
darwinConfigurations."${hostname}" = nix-darwin.lib.darwinSystem {
inherit system specialArgs;
modules = [
./modules/nix
./modules/system
./modules/apps
./modules/services
./modules/users
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home;
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations.${system}.pkgs;
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
};
}