From 7758b10f55a7779822fdf5ab8f8fb455dd68ac5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 20 Sep 2025 13:13:06 -0600 Subject: [PATCH] refactor(nixpkgs): move nix settings into module --- hosts/deertopia/configuration.nix | 15 --------------- hosts/fruitbook/configuration.nix | 20 -------------------- hosts/sydpc/configuration.nix | 20 -------------------- modules/nixos/nixpkgs.nix | 20 ++++++++++++++++++++ 4 files changed, 20 insertions(+), 55 deletions(-) diff --git a/hosts/deertopia/configuration.nix b/hosts/deertopia/configuration.nix index 9b846d4..c49cde4 100644 --- a/hosts/deertopia/configuration.nix +++ b/hosts/deertopia/configuration.nix @@ -116,21 +116,6 @@ }; }; - nix = { - settings = { - trusted-users = [ - "@wheel" - ]; - substituters = [ - "https://nix-community.cachix.org" - "https://cache.nixos.org" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - }; - # This option defines the first version of NixOS you have installed on this # particular machine, and is used to maintain compatibility with application # data (e.g. databases) created on older NixOS versions. diff --git a/hosts/fruitbook/configuration.nix b/hosts/fruitbook/configuration.nix index 3a174b5..e4287ed 100644 --- a/hosts/fruitbook/configuration.nix +++ b/hosts/fruitbook/configuration.nix @@ -107,26 +107,6 @@ settings.X11Forwarding = true; }; - nix = { - settings = { - allow-import-from-derivation = true; - trusted-users = [ - "@wheel" - ]; - substituters = [ - "https://cache.deertopia.net" - "https://nix-community.cachix.org" - "https://cache.nixos.org" - "https://cache.iog.io" - ]; - trusted-public-keys = [ - (builtins.readFile ../../public-keys/deertopia-cache.pub.pem) - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - ]; - }; - }; - security.pki.certificateFiles = [ ../../public-keys/lolc.at.crt ]; diff --git a/hosts/sydpc/configuration.nix b/hosts/sydpc/configuration.nix index 93a8eea..c686d19 100644 --- a/hosts/sydpc/configuration.nix +++ b/hosts/sydpc/configuration.nix @@ -127,26 +127,6 @@ settings.X11Forwarding = true; }; - nix = { - settings = { - allow-import-from-derivation = true; - trusted-users = [ - "@wheel" - ]; - substituters = [ - "https://cache.deertopia.net" - "https://nix-community.cachix.org" - "https://cache.nixos.org" - "https://cache.iog.io" - ]; - trusted-public-keys = [ - (builtins.readFile ../../public-keys/deertopia-cache.pub.pem) - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - ]; - }; - }; - security.pki.certificateFiles = [ ../../public-keys/lolc.at.crt ]; diff --git a/modules/nixos/nixpkgs.nix b/modules/nixos/nixpkgs.nix index 8b961d3..c885700 100644 --- a/modules/nixos/nixpkgs.nix +++ b/modules/nixos/nixpkgs.nix @@ -10,5 +10,25 @@ in { config = lib.mkIf cfg.enable { nixpkgs.config.allowUnfree = true; + + nix = { + settings = { + allow-import-from-derivation = true; + trusted-users = [ + "@wheel" + ]; + substituters = [ + "https://cache.deertopia.net" + "https://nix-community.cachix.org" + "https://cache.nixos.org" + "https://cache.iog.io" + ]; + trusted-public-keys = [ + (builtins.readFile ../../public-keys/deertopia-cache.pub.pem) + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + ]; + }; + }; }; }