feat: move nix settings to nix.nix

This commit is contained in:
2026-02-20 19:43:02 +01:00
parent 5e84ea16ea
commit 6fe546b632
3 changed files with 24 additions and 15 deletions

View File

@@ -24,11 +24,6 @@ in
yubikey.enable = true; yubikey.enable = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
stylix = { stylix = {
enable = true; enable = true;
polarity = "dark"; polarity = "dark";

View File

@@ -18,22 +18,13 @@ let
user: import ../users/${user}/home-manager.nix { inherit inputs; } user: import ../users/${user}/home-manager.nix { inherit inputs; }
); );
gib_in_bytes = 1073741824;
in in
nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
{ ../nix.nix
nix.settings = {
download-buffer-size = 1 * gib_in_bytes;
experimental-features = [
"nix-command"
"flakes"
];
};
}
{ nixpkgs.overlays = overlays; } { nixpkgs.overlays = overlays; }
{ nixpkgs.config.allowUnfree = true; } { nixpkgs.config.allowUnfree = true; }

23
nix.nix Normal file
View File

@@ -0,0 +1,23 @@
{
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
];
download-buffer-size = 2 * 1024 * 1024 * 1024;
warn-dirty = false;
};
gc = {
automatic = true;
dates = "monthly";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = [ "monthly" ];
};
};
}