modules/nixfiles/nixfiles-system-upgrade.nix,modules/clerie-system-upgrade: rename module
This commit is contained in:
@@ -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;
|
Reference in New Issue
Block a user