flake.nix (view raw)
1{
2 description = "icy's nixos config";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 nixpkgs-master.url = "github:NixOS/nixpkgs/master";
7
8 nixos-hardware.url = "github:nixos/nixos-hardware";
9
10 home-manager = {
11 url = "github:nix-community/home-manager";
12 inputs.nixpkgs.follows = "nixpkgs";
13 };
14
15
16 darwin = {
17 url = "github:lnl7/nix-darwin/master";
18 inputs.nixpkgs.follows = "nixpkgs";
19 };
20
21 prompt = {
22 url = "git+https://git.peppe.rs/cli/prompt";
23 inputs.nixpkgs.follows = "nixpkgs";
24 };
25
26 nix-snapshotter = {
27 url = "github:pdtpartners/nix-snapshotter";
28 inputs.nixpkgs.follows = "nixpkgs";
29 };
30
31 nix-your-shell = {
32 url = "github:MercuryTechnologies/nix-your-shell";
33 inputs.nixpkgs.follows = "nixpkgs";
34 };
35 };
36
37 outputs =
38 { self
39 , nixpkgs
40 , nixpkgs-master
41 , nixos-hardware
42 , nix-snapshotter
43 , nix-your-shell
44 , home-manager
45 , prompt
46 , darwin
47 , ...
48 } @ inputs: {
49
50 overlays = {
51 prompt = prompt.overlay;
52 customPkgs = final: prev: {
53 zed-editor = inputs.nixpkgs-master.legacyPackages.${prev.system}.zed-editor;
54 };
55 };
56
57 darwinConfigurations = {
58 syl = darwin.lib.darwinSystem {
59 system = "x86_64-darwin";
60 modules = [
61 {
62 imports = [ ./hosts/syl/configuration.nix ];
63 _module.args.self = self;
64 }
65 home-manager.darwinModules.home-manager
66 {
67 home-manager.useGlobalPkgs = true;
68 home-manager.useUserPackages = true;
69 home-manager.users.icy = {
70 imports = [ ./darwin/home.nix ];
71 _module.args.self = self;
72 _module.args.host = "syl";
73 _module.args.inputs = inputs;
74 };
75 }
76 ];
77 };
78
79 kvothe = darwin.lib.darwinSystem {
80 system = "aarch64-darwin";
81 modules = [
82 {
83 imports = [ ./hosts/kvothe/configuration.nix ];
84 _module.args.self = self;
85 }
86 home-manager.darwinModules.home-manager
87 {
88 home-manager.useGlobalPkgs = true;
89 home-manager.useUserPackages = true;
90 home-manager.users.icy = {
91 imports = [ ./darwin/home.nix ];
92 _module.args.self = self;
93 _module.args.host = "kvothe";
94 _module.args.inputs = inputs;
95 };
96 }
97 ];
98 };
99 };
100
101 nixosConfigurations = {
102 wyndle = nixpkgs.lib.nixosSystem {
103 system = "x86_64-linux";
104 modules = [
105 {
106 imports = [ ./hosts/wyndle/configuration.nix ];
107 _module.args.self = self;
108 nixpkgs.overlays = [ nix-your-shell.overlays.default ];
109 }
110 home-manager.nixosModules.home-manager
111 {
112 home-manager.useGlobalPkgs = true;
113 home-manager.useUserPackages = true;
114 home-manager.users.icy = {
115 imports = [ ./home.nix ];
116 _module.args.self = self;
117 _module.args.host = "wyndle";
118 _module.args.inputs = inputs;
119 };
120 }
121 ];
122 };
123 };
124
125 nixosConfigurations = {
126 sini = nixpkgs.lib.nixosSystem {
127 system = "x86_64-linux";
128 modules = [
129 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
130 ({ config, pkgs, ... }: {
131 services.pixelfed.package = nixpkgs-master.legacyPackages."x86_64-linux".pixelfed;
132 services.pixelfed.phpPackage = nixpkgs-master.legacyPackages."x86_64-linux".php82;
133 })
134 # ({ pkgs, ... }: {
135 # imports = [ nix-snapshotter.nixosModules.default ];
136 # nixpkgs.overlays = [ nix-snapshotter.overlays.default ];
137 # })
138 {
139 imports = [ ./hosts/sini/configuration.nix ];
140 _module.args.self = self;
141 }
142 ];
143 };
144 };
145
146 nixosConfigurations = {
147 denna = nixpkgs.lib.nixosSystem {
148 system = "x86_64-linux";
149 modules = [
150 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
151 {
152 imports = [ ./hosts/denna/configuration.nix ];
153 _module.args.self = self;
154 }
155 ];
156 };
157 };
158
159 nixosConfigurations = {
160 iso = nixpkgs.lib.nixosSystem {
161 system = "x86_64-linux";
162 modules = [
163 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
164 {
165 imports = [ ./hosts/iso/configuration.nix ];
166 _module.args.self = self;
167 }
168 ];
169 };
170 };
171 };
172}