From a5495be32b39be4dd6f15384f909df34b5bcbeae Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Thu, 15 Jul 2021 20:26:09 +0700 Subject: [PATCH] split nix options into a module --- hosts/winter.nix | 18 +----------------- modules/system/nix.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 modules/system/nix.nix diff --git a/hosts/winter.nix b/hosts/winter.nix index 467f971..c7823be 100644 --- a/hosts/winter.nix +++ b/hosts/winter.nix @@ -21,29 +21,13 @@ kernel kernel-winter networking + nix packages security snapper ../users/rin.nix ]; - nix = rec { - package = pkgs.nixUnstable; - binaryCaches = [ - "https://cache.nixos.org?priority=10" - "https://lava.cachix.org" - ]; - binaryCachePublicKeys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "lava.cachix.org-1:8lTWI/3IKWHByzzYHZySunMPYs2eAJw2duL+uLZkSy0=" - ]; - trustedBinaryCaches = binaryCaches; - - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - nixpkgs.config.allowUnfree = true; i18n.defaultLocale = "en_GB.UTF-8"; } diff --git a/modules/system/nix.nix b/modules/system/nix.nix new file mode 100644 index 0000000..b111623 --- /dev/null +++ b/modules/system/nix.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: { + nix = rec { + package = pkgs.nixUnstable; + binaryCaches = [ + "https://cache.nixos.org?priority=10" + "https://lava.cachix.org" + ]; + binaryCachePublicKeys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "lava.cachix.org-1:8lTWI/3IKWHByzzYHZySunMPYs2eAJw2duL+uLZkSy0=" + ]; + trustedBinaryCaches = binaryCaches; + + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + nixpkgs.config.allowUnfree = true; +}