feat(flake): add nix-community cachix to nix substituters
Also sets substituters on flake.nix's `nixConfig` in addition to `nixosConfiguration`s `nix.settings`.
This commit is contained in:
parent
e8e8ffe166
commit
4f22b0857d
23
flake.nix
23
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 = {
|
inputs = {
|
||||||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2305.tar.gz";
|
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2305.tar.gz";
|
||||||
|
|
||||||
|
@ -136,7 +151,7 @@
|
||||||
[ deploy-rs.defaultPackage.x86_64-linux ];
|
[ deploy-rs.defaultPackage.x86_64-linux ];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs nixConfig; };
|
||||||
};
|
};
|
||||||
pilot1 = nixpkgs.lib.nixosSystem {
|
pilot1 = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -155,7 +170,7 @@
|
||||||
config = ./home/felschr-work.nix;
|
config = ./home/felschr-work.nix;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs nixConfig; };
|
||||||
};
|
};
|
||||||
home-server = nixpkgs.lib.nixosSystem {
|
home-server = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -180,7 +195,7 @@
|
||||||
config = ./home/felschr-server.nix;
|
config = ./home/felschr-server.nix;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs nixConfig; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, inputs, ... }:
|
{ lib, inputs, nixConfig, ... }:
|
||||||
|
|
||||||
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
let flakes = lib.filterAttrs (name: value: value ? outputs) inputs;
|
||||||
in {
|
in {
|
||||||
|
@ -11,14 +11,8 @@ in {
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = [ "@wheel" ];
|
trusted-users = [ "@wheel" ];
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [
|
substituters = nixConfig.extra-substituters;
|
||||||
"https://felschr.cachix.org"
|
trusted-public-keys = nixConfig.extra-trusted-public-keys;
|
||||||
"https://wurzelpfropf.cachix.org" # ragenix
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"felschr.cachix.org-1:raomy5XA2tsVkBoG6wo70ARIn+V24IXhWaSe3QZo12A="
|
|
||||||
"wurzelpfropf.cachix.org-1:ilZwK5a6wJqVr7Fyrzp4blIEkGK+LJT0QrpWr1qBNq0="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
|
|
Loading…
Reference in a new issue