From 2a9cccc98bd1a8b0019b858aa4f9c21c7efb8b0b Mon Sep 17 00:00:00 2001 From: sefidel Date: Mon, 15 Jan 2024 13:21:14 +0900 Subject: project!: disambiguate nix,nixpkgs options --- modules/nix.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'modules/nix.nix') diff --git a/modules/nix.nix b/modules/nix.nix index 8396739..37c9fe5 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,8 +1,5 @@ { config, lib, ... }: -let - allowed = config.nix.allowedUnfree; -in { options.nix = { experimentalFeatures = lib.mkOption { @@ -12,19 +9,13 @@ in 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); }) + (lib.mkIf + (config.nix.experimentalFeatures != "") + { nix.extraOptions = "experimental-features = ${config.nix.experimentalFeatures}"; }) + { nix.settings.auto-optimise-store = lib.mkDefault true; } { nix.gc.automatic = lib.mkDefault true; -- cgit 1.4.1