diff options
| author | seth <[email protected]> | 2023-08-23 22:19:22 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-24 04:21:43 -0400 |
| commit | af6a211d9a763b87b62062ae60826ef88967b3e8 (patch) | |
| tree | 38d15773d2d9cba2dcf8c30bb19bf2ac247c28df /modules/shared/base | |
| parent | f324d84bc86db1b4b81c447f536adc24f7731578 (diff) | |
hosts/profiles+modules: centralize nix/nixpkgs options
Diffstat (limited to 'modules/shared/base')
| -rw-r--r-- | modules/shared/base/nix.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/shared/base/nix.nix b/modules/shared/base/nix.nix index 21af0e0..d1b7e60 100644 --- a/modules/shared/base/nix.nix +++ b/modules/shared/base/nix.nix @@ -1,5 +1,6 @@ { config, + inputs, lib, pkgs, ... @@ -12,9 +13,26 @@ in { config = mkIf cfg.enable { nix = { + registry = + { + n.flake = mkDefault inputs.nixpkgs; + } + // (builtins.mapAttrs (_: flake: {inherit flake;}) + (inputs.nixpkgs.lib.filterAttrs (n: _: n != "nixpkgs") inputs)); + settings = { auto-optimise-store = isLinux; experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "repl-flake"]; + + trusted-substituters = [ + "https://getchoo.cachix.org" + "https://nix-community.cachix.org" + ]; + + trusted-public-keys = [ + "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; }; gc = { @@ -22,5 +40,10 @@ in { options = mkDefault "--delete-older-than 7d"; }; }; + + nixpkgs = { + overlays = with inputs; [nur.overlay getchoo.overlays.default self.overlays.default]; + config.allowUnfree = true; + }; }; } |
