Add shared modules for nix-gc and nix-settings
This commit is contained in:
10
flake.nix
Normal file
10
flake.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
description = "Shared Nix settings (NixOS, Home Manager etc)";
|
||||||
|
|
||||||
|
outputs = { self }: {
|
||||||
|
nixosModules = {
|
||||||
|
nix-settings = import ./modules/nix-settings.nix;
|
||||||
|
nix-gc = import ./modules/nix-gc.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/nix-gc.nix
Normal file
7
modules/nix-gc.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
_: {
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 60d";
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/nix-settings.nix
Normal file
15
modules/nix-settings.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
_: {
|
||||||
|
nix.settings = {
|
||||||
|
extra-experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
|
auto-optimise-store = true;
|
||||||
|
|
||||||
|
trusted-users = [ "@wheel" ];
|
||||||
|
|
||||||
|
# RPi builds can be slow due to compiling via binfmt.
|
||||||
|
download-buffer-size = 1 * 1024 * 1024 * 1024;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user