-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
108 lines (98 loc) · 2.78 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
96
97
98
99
100
101
102
103
104
105
106
107
108
{
description = "flake config for nixos";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
#nixpkgs.url = "nixpkgs/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
# adds firefox addons from NUR
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{
disko,
home-manager,
nixpkgs,
self,
sops-nix,
stylix,
...
}:
let
lib = nixpkgs.lib;
in
{
nixosConfigurations = {
t470 = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/t470
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
sharedModules = [
inputs.nixvim.homeManagerModules.nixvim
inputs.sops-nix.homeManagerModules.sops
];
users.da = import ./home/da;
#users.desk = import ./home/desk;
#users.guest = import ./home/guest;
};
}
];
};
x220 = lib.nixosSystem {
system = "x86_64-linux";
modules = [
./hosts/x220 # disko gets added here
disko.nixosModules.disko
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
}; # allows access to flake inputs in hm modules
sharedModules = [
inputs.nixvim.homeManagerModules.nixvim
inputs.sops-nix.homeManagerModules.sops
];
users.da = import ./home/da;
};
}
];
};
};
};
}