-
Notifications
You must be signed in to change notification settings - Fork 9
/
flake.nix
71 lines (71 loc) · 1.77 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
60
61
62
63
64
65
66
67
68
69
70
71
{
description = "Evan's Nix System Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
darwin,
home-manager,
nixos-wsl,
...
} @ inputs: let
darwinSystem = {user, arch ? "aarch64-darwin"}:
darwin.lib.darwinSystem {
system = arch;
modules = [
./darwin/darwin.nix
home-manager.darwinModules.home-manager
{
_module.args = { inherit inputs; };
home-manager = {
users.${user} = import ./home-manager;
};
users.users.${user}.home = "/Users/${user}";
nix.settings.trusted-users = [ user ];
}
];
};
in
{
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.wsl
./nixos/configuration.nix
./.config/wsl
home-manager.nixosModules.home-manager
{
home-manager = {
users.nixos = import ./home-manager;
};
nix.settings.trusted-users = [ "nixos" ];
}
];
};
};
darwinConfigurations = {
"G2157QVFX1" = darwinSystem {
user = "etravers";
};
"Evans-MacBook-Pro" = darwinSystem {
user = "evan";
arch = "x86_64-darwin";
};
};
};
}