1
0

modules/nixfiles/nixfiles-system-upgrade.nix,modules/clerie-system-upgrade: rename module

This commit is contained in:
clerie 2024-03-14 20:30:37 +01:00
parent b98fb3b061
commit f011e3fc9e
8 changed files with 12 additions and 12 deletions

View File

@ -4,7 +4,7 @@
clerie.nixfiles.enable = true;
clerie.nixfiles.system-auto-upgrade.enable = true;
clerie.system-auto-upgrade.enable = true;
nix.settings = {
trusted-users = [ "@wheel" "@guests" ];

View File

@ -329,7 +329,7 @@
}
'';
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
};

View File

@ -183,7 +183,7 @@
}
'';
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
startAt = "*-*-* 06:22:00";

View File

@ -183,7 +183,7 @@
}
'';
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
startAt = "*-*-* 07:22:00";

View File

@ -62,7 +62,7 @@ in {
};
};
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
};

View File

@ -39,7 +39,7 @@
networking.firewall.allowedUDPPorts = [];
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
};

View File

@ -28,7 +28,7 @@
networking.firewall.allowedTCPPorts = [ 80 443 ];
clerie.nixfiles.system-auto-upgrade = {
clerie.system-auto-upgrade = {
allowReboot = true;
autoUpgrade = true;
};

View File

@ -3,13 +3,13 @@
with lib;
let
cfg = config.clerie.nixfiles.system-auto-upgrade;
cfg = config.clerie.system-auto-upgrade;
in
{
options = {
clerie.nixfiles.system-auto-upgrade = {
enable = mkEnableOption "clerie nixfiles tools";
clerie.system-auto-upgrade = {
enable = mkEnableOption "clerie system upgrade";
allowReboot = mkOption {
type = types.bool;
default = false;
@ -28,7 +28,7 @@ in
};
};
config = mkIf cfg.enable {
systemd.services.nixfiles-system-auto-upgrade = {
systemd.services.clerie-system-auto-upgrade = {
# Make sure this unit does not stop themself while upgrading
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
@ -38,7 +38,7 @@ in
ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}${optionalString (config.clerie.monitoring.enable) " --node-exporter-metrics-path /var/lib/prometheus-node-exporter/textfiles/nixfiles-system-upgrade.prom"}";
};
};
systemd.timers.nixfiles-system-auto-upgrade = mkIf cfg.autoUpgrade {
systemd.timers.clerie-system-auto-upgrade = mkIf cfg.autoUpgrade {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = if cfg.startAt == null then "*-*-* 05:37:00" else cfg.startAt;