diff --git a/flake.nix b/flake.nix index a2fbf0b..1b27fe7 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,22 @@ "x86_64-darwin" "aarch64-darwin" ]; + nixpkgsUnfree = { + config, + lib, + ... + }: + with lib; let + list = config.nix.allowUnfreeList; + in { + options.nix.allowUnfreeList = mkOption { + type = with types; listOf str; + default = []; + }; + config.nixpkgs.config.allowUnfreePredicate = p: + builtins.elem (getName p) list; + }; + commonModules = [nixpkgsUnfree]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let pkgs = import nixpkgs {inherit system;}; @@ -98,12 +114,14 @@ }; inherit inputs self; }; - modules = [ - ./hosts/dreadnought/configuration.nix - ./home/terminal/configuration.nix - inputs.stylix.nixosModules.stylix - ./style.nix - ]; + modules = + [ + ./hosts/dreadnought/configuration.nix + ./home/terminal/configuration.nix + inputs.stylix.nixosModules.stylix + ./style.nix + ] + ++ commonModules; }; "battleship" = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; @@ -115,10 +133,12 @@ }; inherit inputs self; }; - modules = [ - ./hosts/battleship/configuration.nix - ./home/worm/configuration.nix - ]; + modules = + [ + ./hosts/battleship/configuration.nix + ./home/worm/configuration.nix + ] + ++ commonModules; }; "fighter" = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; @@ -130,12 +150,14 @@ }; inherit inputs self; }; - modules = [ - ./hosts/fighter/configuration.nix - ./home/terminal/configuration.nix - inputs.stylix.nixosModules.stylix - ./style.nix - ]; + modules = + [ + ./hosts/fighter/configuration.nix + ./home/terminal/configuration.nix + inputs.stylix.nixosModules.stylix + ./style.nix + ] + ++ commonModules; }; "rusty" = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; @@ -147,12 +169,14 @@ }; inherit inputs self; }; - modules = [ - ./hosts/lost-home/configuration.nix - ./home/terminal/configuration.nix - inputs.stylix.nixosModules.stylix - ./style.nix - ]; + modules = + [ + ./hosts/lost-home/configuration.nix + ./home/terminal/configuration.nix + inputs.stylix.nixosModules.stylix + ./style.nix + ] + ++ commonModules; }; "infiltrator" = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; @@ -164,9 +188,11 @@ }; inherit inputs self; }; - modules = [ - ./hosts/infriltrator/configuration.nix - ]; + modules = + [ + ./hosts/infriltrator/configuration.nix + ] + ++ commonModules; }; }; diff --git a/home/terminal/configuration.nix b/home/terminal/configuration.nix index 3dbfe1d..b4b57c6 100644 --- a/home/terminal/configuration.nix +++ b/home/terminal/configuration.nix @@ -62,15 +62,17 @@ # Drawing Tablet hardware.opentabletdriver.enable = true; - # Nixpkgs - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "obsidian" - "steam" - "steam-unwrapped" - "via" - "vivaldi" ]; + # Nixpkgs + nix.allowUnfreeList = [ + # "davinci-resolve" + "obsidian" + "steam" + "steam-unwrapped" + "via" + "vivaldi" + ]; + environment.sessionVariables.NIXOS_OZONE_WL = "1"; } diff --git a/home/worm/configuration.nix b/home/worm/configuration.nix index 4e91fab..ed691e7 100644 --- a/home/worm/configuration.nix +++ b/home/worm/configuration.nix @@ -29,6 +29,5 @@ users.groups."guz" = {}; # Nixpkgs - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) ["via"]; + nix.allowUnfreeList = ["via"]; } diff --git a/hosts/infriltrator/configuration.nix b/hosts/infriltrator/configuration.nix index d40f9ff..0875551 100644 --- a/hosts/infriltrator/configuration.nix +++ b/hosts/infriltrator/configuration.nix @@ -79,10 +79,7 @@ # Nix nix.settings.experimental-features = ["nix-command" "flakes"]; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "via" - ]; + nix.allowUnfreeList = ["via"]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions