-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
95 lines (88 loc) · 3.06 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
description = "Cool Beans";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-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";
NixOS-WSL = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs @ { self
, nix-darwin
, home-manager
, nixpkgs
, NixOS-WSL
, ...
}: {
# Build darwin flake using:
# $ darwin-rebuild build --flake .#centennial
darwinConfigurations.centennial = nix-darwin.lib.darwinSystem {
modules = [
./hosts/centennial
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zack = import ./home/centennial.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
specialArgs = { inherit inputs self; };
};
nixosConfigurations.tabernacle = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; }; # pass custom arguments into sub module.
modules = [
./hosts/tabernacle
NixOS-WSL.nixosModules.wsl
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zack = import ./home/tabernacle.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
nixosConfigurations.symphony = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; }; # pass custom arguments into sub module.
modules = [
./hosts/symphony
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.zack = import ./home/symphony.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations.centennial.pkgs;
nixosConfigurations.iso = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
({ pkgs, ... }: {
environment.systemPackages = with pkgs; [
neovim
git
networkmanager
gptfdisk
];
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
users.users.root.openssh.authorizedKeys.keys = [
# ssh-add -L
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP0PMZX36AvlE6+w7TWF0Nvg4QBl6rV+xuaffQDR6Mcs cardno:26_329_662"
];
})
];
};
};
}