diff --git a/flake.nix b/flake.nix index 00dbc86..3413236 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,19 @@ -{ +rec { + description = "felschr's NixOS configuration"; + + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org" + "https://wurzelpfropf.cachix.org" # ragenix + "https://felschr.cachix.org" + ]; + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "wurzelpfropf.cachix.org-1:ilZwK5a6wJqVr7Fyrzp4blIEkGK+LJT0QrpWr1qBNq0=" + "felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A=" + ]; + }; + inputs = { nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2305.tar.gz"; @@ -136,7 +151,7 @@ [ deploy-rs.defaultPackage.x86_64-linux ]; }) ]; - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs nixConfig; }; }; pilot1 = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -155,7 +170,7 @@ config = ./home/felschr-work.nix; }) ]; - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs nixConfig; }; }; home-server = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -180,7 +195,7 @@ config = ./home/felschr-server.nix; }) ]; - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs nixConfig; }; }; }; diff --git a/system/nix.nix b/system/nix.nix index b6d5144..6273b0f 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,4 +1,4 @@ -{ lib, inputs, ... }: +{ lib, inputs, nixConfig, ... }: let flakes = lib.filterAttrs (name: value: value ? outputs) inputs; in { @@ -11,14 +11,8 @@ in { nix.settings = { trusted-users = [ "@wheel" ]; auto-optimise-store = true; - substituters = [ - "https://felschr.cachix.org" - "https://wurzelpfropf.cachix.org" # ragenix - ]; - trusted-public-keys = [ - "felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A=" - "wurzelpfropf.cachix.org-1:ilZwK5a6wJqVr7Fyrzp4blIEkGK+LJT0QrpWr1qBNq0=" - ]; + substituters = nixConfig.extra-substituters; + trusted-public-keys = nixConfig.extra-trusted-public-keys; }; system.autoUpgrade = {