Initial commit
This commit is contained in:
commit
a43b5a6a1a
12 changed files with 550 additions and 0 deletions
41
modules/nix-settings.nix
Normal file
41
modules/nix-settings.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.nixSettings;
|
||||
in {
|
||||
options.nixSettings = {
|
||||
gc = {
|
||||
automatic = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enables automatic garbage collection";
|
||||
};
|
||||
dates = mkOption {
|
||||
type = types.str;
|
||||
default = "weekly";
|
||||
example = "03:15";
|
||||
description = mdDoc ''
|
||||
How often or when garbage collection is performed. For most desktop and server systems
|
||||
a sufficient garbage collection is once a week.
|
||||
|
||||
The format is described in
|
||||
{manpage}`systemd.time(7)`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
automatic = cfg.gc.automatic;
|
||||
dates = cfg.gc.dates;
|
||||
};
|
||||
settings.experimental-features = [ "flakes" "nix-command" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue