Moved modules into appropriate folders
This commit is contained in:
parent
48dcf38304
commit
3760c929fe
9 changed files with 18 additions and 8 deletions
43
modules/utils/commons.nix
Normal file
43
modules/utils/commons.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.commons;
|
||||
in
|
||||
{
|
||||
options.commons = {
|
||||
enable = lib.mkEnableOption "Enable commons stuff that are always nice to have";
|
||||
|
||||
allowReboot = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = config.system.autoUpgrade.allowReboot;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Auto update
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
randomizedDelaySec = "10min";
|
||||
allowReboot = cfg.allowReboot;
|
||||
};
|
||||
|
||||
nix = {
|
||||
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
gc = {
|
||||
# Auto delete old generations
|
||||
automatic = true;
|
||||
options = "--delete-older-than 2d";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue