diff options
author | sefidel <contact@sefidel.net> | 2023-08-21 19:20:36 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2023-08-21 19:22:01 +0900 |
commit | bc4039ae8c86f794cece9d9ceb43b838e61cf445 (patch) | |
tree | 3991ec87c676fcfbb22a72de866ca0e14b137403 /nixos/modules/nix.nix | |
parent | 76dc3decd5e8b9d0494cd65be2303784f64d1a24 (diff) | |
download | nixrc-bc4039ae8c86f794cece9d9ceb43b838e61cf445.tar.gz nixrc-bc4039ae8c86f794cece9d9ceb43b838e61cf445.zip |
chore: nixos/modules -> modules
Diffstat (limited to 'nixos/modules/nix.nix')
-rw-r--r-- | nixos/modules/nix.nix | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/nixos/modules/nix.nix b/nixos/modules/nix.nix deleted file mode 100644 index 8396739..0000000 --- a/nixos/modules/nix.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ config, lib, ... }: - -let - allowed = config.nix.allowedUnfree; -in -{ - options.nix = { - experimentalFeatures = lib.mkOption { - type = lib.types.separatedString " "; - default = ""; - description = '' - Enables experimental features - ''; - }; - - allowedUnfree = lib.mkOption { - type = lib.types.listOf lib.types.str; - default = [ ]; - description = '' - Allows for unfree packages by their name. - ''; - }; - }; - - config = lib.mkMerge [ - (lib.mkIf (config.nix.experimentalFeatures != "") { nix.extraOptions = "experimental-features = ${config.nix.experimentalFeatures}"; }) - (lib.mkIf (allowed != [ ]) { nixpkgs.config.allowUnfreePredicate = (pkg: __elem (lib.getName pkg) allowed); }) - { nix.settings.auto-optimise-store = lib.mkDefault true; } - { - nix.gc.automatic = lib.mkDefault true; - nix.gc.options = lib.mkDefault "--delete-older-than 10d"; - } - ]; -} |