From c3060dd76767a9f4be8af3ac65255e621ab23ab2 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Thu, 5 Oct 2023 01:37:45 -0400 Subject: [PATCH] refactor(nix): move nix.conf stuff to flake --- nixos/configuration.nix | 1 - nixos/flake.nix | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 9bbf7a63..d734a2a2 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -25,7 +25,6 @@ #useXkbConfig = true; # use xkbOptions in tty. }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.config.allowUnfree = true; # This value determines the NixOS release from which the default diff --git a/nixos/flake.nix b/nixos/flake.nix index 4f39f34e..6bd10480 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -24,10 +24,20 @@ specialArgs = attrs; modules = [ ({ ... }: { - nix.registry = { - nixpkgs.flake = self.inputs.nixpkgs; + nix = { + # Edit nix.conf + settings = { + experimental-features = [ "nix-command" "flakes" ]; + keep-outputs = true; + auto-optimise-store = true; + warn-dirty = false; + }; + # Minimize dowloads of indirect nixpkgs flakes - nixpkgs.exact = false; + registry = { + nixpkgs.flake = self.inputs.nixpkgs; + nixpkgs.exact = false; + }; }; }) ./configuration.nix