From feb5799049c711c2cf7f52515d95b8f98d15d1f5 Mon Sep 17 00:00:00 2001 From: Noa Aarts Date: Mon, 21 Oct 2024 09:23:25 +0200 Subject: [PATCH] feat: move substitutors list to common --- common/default.nix | 11 ++++++----- common/substitutors.nix | 28 ++++++++++++++++++++++++++++ hosts/ksios/configuration.nix | 16 ---------------- hosts/lambdaos/configuration.nix | 32 -------------------------------- hosts/muos/configuration.nix | 26 -------------------------- hosts/nuos/configuration.nix | 22 ---------------------- 6 files changed, 34 insertions(+), 101 deletions(-) create mode 100644 common/substitutors.nix diff --git a/common/default.nix b/common/default.nix index 8adc809..dbdc50a 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,7 +1,8 @@ -{...}: +{ ... }: { - imports = [ - ./locale.nix - ./boot.nix - ]; + imports = [ + ./locale.nix + ./boot.nix + ./substitutors.nix + ]; } diff --git a/common/substitutors.nix b/common/substitutors.nix new file mode 100644 index 0000000..df3cb37 --- /dev/null +++ b/common/substitutors.nix @@ -0,0 +1,28 @@ +{ ... }: { + nix = { + settings = { + # auto optimise every so often + # auto-optimise-store = true; + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ + "https://hyprland.cachix.org" + "https://cache.iog.io" + "https://cuda-maintainers.cachix.org" + "https://nix-community.cachix.org/" + "https://cache.iog.io" + ]; + trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" + ]; + allowed-uris = [ + "github:" + "gitlab:" + ]; + }; + optimise.automatic = true; + }; +} diff --git a/hosts/ksios/configuration.nix b/hosts/ksios/configuration.nix index c684765..dd9a8a7 100644 --- a/hosts/ksios/configuration.nix +++ b/hosts/ksios/configuration.nix @@ -25,22 +25,6 @@ networkmanager.enable = true; # Easiest to use and most distros use this by default. }; - nix = { - settings = { - # auto optimise every so often - auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - substituters = [ ]; - trusted-public-keys = [ ]; - - allowed-uris = [ - "github:" - "gitlab:" - ]; - }; - gc.automatic = false; - }; - # Set your time zone. time.timeZone = "Europe/Amsterdam"; diff --git a/hosts/lambdaos/configuration.nix b/hosts/lambdaos/configuration.nix index 75019e5..41f564f 100644 --- a/hosts/lambdaos/configuration.nix +++ b/hosts/lambdaos/configuration.nix @@ -58,38 +58,6 @@ programs.nm-applet.enable = true; - nix = { - settings = { - # auto optimise every so often - # auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - substituters = [ - "https://hyprland.cachix.org" - "https://cache.iog.io" - "https://cuda-maintainers.cachix.org" - "https://nix-community.cachix.org/" - "https://cache.iog.io" - ]; - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - ]; - allowed-uris = [ - "github:" - "gitlab:" - ]; - }; - optimise.automatic = true; - gc = { - automatic = false; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - }; - # Set your time zone. time.timeZone = "Europe/Amsterdam"; diff --git a/hosts/muos/configuration.nix b/hosts/muos/configuration.nix index dd4cd37..b2507e5 100644 --- a/hosts/muos/configuration.nix +++ b/hosts/muos/configuration.nix @@ -46,32 +46,6 @@ programs.nm-applet.enable = true; - nix = { - settings = { - # auto optimise every so often - # auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - substituters = [ - "https://hyprland.cachix.org" - "https://cache.iog.io" - "https://cuda-maintainers.cachix.org" - # "http://192.168.42.5" - ]; - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" - "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" - # "192.168.42.5:+zcyHtRvk2otQhHDrDRNMQhp+j+ziVHHhDToC0wqjHE=" - ]; - }; - optimise.automatic = true; - gc = { - automatic = false; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; - }; - # Set your time zone. time.timeZone = "Europe/Amsterdam"; diff --git a/hosts/nuos/configuration.nix b/hosts/nuos/configuration.nix index cacf63d..a9acbbd 100644 --- a/hosts/nuos/configuration.nix +++ b/hosts/nuos/configuration.nix @@ -27,28 +27,6 @@ # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - nix = { - settings = { - # auto optimise every so often - auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; - substituters = [ - "https://hyprland.cachix.org" - "http://192.168.42.5" - ]; - trusted-public-keys = [ - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "192.168.42.5:+zcyHtRvk2otQhHDrDRNMQhp+j+ziVHHhDToC0wqjHE=" - ]; - - allowed-uris = [ - "github:" - "gitlab:" - ]; - }; - gc.automatic = false; - }; - # Set your time zone. time.timeZone = "Europe/Amsterdam";