diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 27 |
1 files changed, 19 insertions, 8 deletions
@@ -4,20 +4,20 @@ | |||
4 | nixConfig = { | 4 | nixConfig = { |
5 | extra-substituters = [ | 5 | extra-substituters = [ |
6 | "https://nix-community.cachix.org" | 6 | "https://nix-community.cachix.org" |
7 | "https://niri.cachix.org" | ||
7 | ]; | 8 | ]; |
8 | extra-trusted-public-keys = [ | 9 | extra-trusted-public-keys = [ |
9 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" | 10 | "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" |
11 | "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" | ||
10 | ]; | 12 | ]; |
11 | }; | 13 | }; |
12 | 14 | ||
13 | inputs = { | 15 | inputs = { |
14 | nixpkgs = { | 16 | nixpkgs = { |
15 | type = "github"; | 17 | type = "github"; |
16 | # owner = "NixOS"; | 18 | owner = "NixOS"; |
17 | repo = "nixpkgs"; | 19 | repo = "nixpkgs"; |
18 | # ref = "nixos-unstable"; | 20 | ref = "nixos-unstable"; |
19 | owner = "gkleen"; | ||
20 | ref = "fix/matrix-synapse"; | ||
21 | }; | 21 | }; |
22 | nixpkgs-pgbackrest = { | 22 | nixpkgs-pgbackrest = { |
23 | type = "github"; | 23 | type = "github"; |
@@ -172,7 +172,7 @@ | |||
172 | type = "github"; | 172 | type = "github"; |
173 | owner = "gkleen"; | 173 | owner = "gkleen"; |
174 | repo = "Waybar"; | 174 | repo = "Waybar"; |
175 | ref = "feat/privacy-ignore"; | 175 | ref = "feat/niri-workspaces-hide"; |
176 | inputs = { | 176 | inputs = { |
177 | nixpkgs.follows = "nixpkgs"; | 177 | nixpkgs.follows = "nixpkgs"; |
178 | flake-compat.follows = "flake-compat"; | 178 | flake-compat.follows = "flake-compat"; |
@@ -184,9 +184,19 @@ | |||
184 | repo = "NixVirt"; | 184 | repo = "NixVirt"; |
185 | inputs.nixpkgs.follows = "nixpkgs"; | 185 | inputs.nixpkgs.follows = "nixpkgs"; |
186 | }; | 186 | }; |
187 | niri-flake = { | ||
188 | type = "github"; | ||
189 | owner = "sodiboo"; | ||
190 | repo = "niri-flake"; | ||
191 | ref = "main"; | ||
192 | inputs = { | ||
193 | nixpkgs.follows = "nixpkgs"; | ||
194 | # niri-unstable.url = "github:gkleen/niri"; | ||
195 | }; | ||
196 | }; | ||
187 | }; | 197 | }; |
188 | 198 | ||
189 | outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs: | 199 | outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, niri-flake, ... }@inputs: |
190 | let | 200 | let |
191 | inherit (builtins) attrNames attrValues elemAt toJSON isNull pathExists; | 201 | inherit (builtins) attrNames attrValues elemAt toJSON isNull pathExists; |
192 | inherit (nixpkgs) lib; | 202 | inherit (nixpkgs) lib; |
@@ -269,9 +279,10 @@ | |||
269 | mkAccountModule = dir: path: accountName: | 279 | mkAccountModule = dir: path: accountName: |
270 | let | 280 | let |
271 | userName = accountUserName accountName; | 281 | userName = accountUserName accountName; |
282 | hostName = accountHostName accountName; | ||
272 | in overrideModule | 283 | in overrideModule |
273 | (import (dir + "/${path}")) | 284 | (import (dir + "/${path}")) |
274 | (inputs: inputs // { inherit userName; }) | 285 | (inputs: inputs // { inherit userName hostName; }) |
275 | (outputs: { _file = dir + "/${path}"; } | 286 | (outputs: { _file = dir + "/${path}"; } |
276 | // outputs | 287 | // outputs |
277 | // { imports = [self.nixosModules.users.${userName} or ({...}: { imports = defaultUserProfiles userName; })] ++ (outputs.imports or []); }); | 288 | // { imports = [self.nixosModules.users.${userName} or ({...}: { imports = defaultUserProfiles userName; })] ++ (outputs.imports or []); }); |
@@ -324,7 +335,7 @@ | |||
324 | nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; | 335 | nixosConfigurations = installerNixosConfigurations // nixImport rec { dir = ./hosts; _import = mkNixosConfiguration [] dir; }; |
325 | 336 | ||
326 | homeModules = nixImport rec { dir = ./home-modules; }; | 337 | homeModules = nixImport rec { dir = ./home-modules; }; |
327 | homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: configuration: nameValuePair "${username}@${hostname}" { inherit (configuration.home) activationPackage; }) nixosConfig.config.home-manager.users) self.nixosConfigurations)); | 338 | homeConfigurations = listToAttrs (concatLists (mapAttrsToList (hostname: nixosConfig: mapAttrsToList (username: nameValuePair "${username}@${hostname}") nixosConfig.config.home-manager.users) self.nixosConfigurations)); |
328 | 339 | ||
329 | overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; | 340 | overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; |
330 | 341 | ||