From 1bcaf4714e4847fd15850528a28ff82c8b62222a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 29 Jan 2023 22:45:53 +0100 Subject: [PATCH] Combine allowUnfree into a single entry --- config/default.nix | 9 +++++++++ hosts/factorio/default.nix | 4 ---- hosts/glotzbert/default.nix | 2 -- hosts/hydra/default.nix | 2 -- hosts/mastodon/default.nix | 2 -- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/config/default.nix b/config/default.nix index 8051c271..f4c18666 100644 --- a/config/default.nix +++ b/config/default.nix @@ -79,6 +79,15 @@ }; }; + nixpkgs.config = { + allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ + "drone.io" + "drone-runner-ssh" + "elasticsearch" # mastodon + "factorio-headless" + ]; + }; + # trust sandro to set good defaults in nixos-modules opinionatedDefaults = true; diff --git a/hosts/factorio/default.nix b/hosts/factorio/default.nix index 0c5c04ad..c2d93ded 100644 --- a/hosts/factorio/default.nix +++ b/hosts/factorio/default.nix @@ -9,10 +9,6 @@ hostName = "factorio"; }; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "factorio-headless" - ]; - services = { factorio = { enable = true; diff --git a/hosts/glotzbert/default.nix b/hosts/glotzbert/default.nix index e17b28ba..fb16a22e 100644 --- a/hosts/glotzbert/default.nix +++ b/hosts/glotzbert/default.nix @@ -9,8 +9,6 @@ autoUpdate = true; }; - nixpkgs.config.allowUnfree = true; - nix.settings = { cores = 4; max-jobs = 4; diff --git a/hosts/hydra/default.nix b/hosts/hydra/default.nix index 9d30858f..8b450a89 100644 --- a/hosts/hydra/default.nix +++ b/hosts/hydra/default.nix @@ -57,8 +57,6 @@ in ''; }; - nixpkgs.config.allowUnfree = true; - containers = { # hydra-binfmt-builder = { # autoStart = true; diff --git a/hosts/mastodon/default.nix b/hosts/mastodon/default.nix index 490e3fc2..a8136145 100644 --- a/hosts/mastodon/default.nix +++ b/hosts/mastodon/default.nix @@ -9,8 +9,6 @@ networking.hostName = "mastodon"; - nixpkgs.config.allowUnfreePredicate = pkg: lib.getName pkg == "elasticsearch"; - services = { # Sidekiq monitoring collectd.plugins = {