From 23d05a3e5d5aa04f0066da35549578c08e72faaa Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 17 Mar 2024 15:50:49 +0100 Subject: [PATCH] pkgs/nixfiles: rename nixfiles-system-upgrade to clerie-system-upgrade --- flake.nix | 2 +- modules/clerie-system-upgrade/default.nix | 4 ++-- .../clerie-system-upgrade.nix} | 4 ++-- .../clerie-system-upgrade.sh} | 2 +- pkgs/overlay.nix | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename pkgs/{nixfiles/nixfiles-system-upgrade.nix => clerie-system-upgrade/clerie-system-upgrade.nix} (53%) rename pkgs/{nixfiles/nixfiles-system-upgrade.sh => clerie-system-upgrade/clerie-system-upgrade.sh} (95%) diff --git a/flake.nix b/flake.nix index b1dd8e2..00f5920 100644 --- a/flake.nix +++ b/flake.nix @@ -112,6 +112,7 @@ }; in { inherit (pkgs) + clerie-system-upgrade chromium-incognito iot-data nix-remove-result-links @@ -119,7 +120,6 @@ nixfiles-auto-install nixfiles-generate-backup-secrets nixfiles-generate-config - nixfiles-system-upgrade nixfiles-updated-inputs nixfiles-update-ssh-host-keys update-from-hydra diff --git a/modules/clerie-system-upgrade/default.nix b/modules/clerie-system-upgrade/default.nix index 6c3a212..2a83a11 100644 --- a/modules/clerie-system-upgrade/default.nix +++ b/modules/clerie-system-upgrade/default.nix @@ -35,7 +35,7 @@ in serviceConfig = { Type = "oneshot"; - 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"}"; + ExecStart = pkgs.clerie-system-upgrade + "/bin/clerie-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}${optionalString (config.clerie.monitoring.enable) " --node-exporter-metrics-path /var/lib/prometheus-node-exporter/textfiles/clerie-system-upgrade.prom"}"; }; }; systemd.timers.clerie-system-auto-upgrade = mkIf cfg.autoUpgrade { @@ -47,7 +47,7 @@ in after = [ "network-online.target" ]; }; environment.systemPackages = with pkgs; [ - nixfiles-system-upgrade + clerie-system-upgrade ]; }; } diff --git a/pkgs/nixfiles/nixfiles-system-upgrade.nix b/pkgs/clerie-system-upgrade/clerie-system-upgrade.nix similarity index 53% rename from pkgs/nixfiles/nixfiles-system-upgrade.nix rename to pkgs/clerie-system-upgrade/clerie-system-upgrade.nix index 9d494f4..5088be4 100644 --- a/pkgs/nixfiles/nixfiles-system-upgrade.nix +++ b/pkgs/clerie-system-upgrade/clerie-system-upgrade.nix @@ -1,8 +1,8 @@ { pkgs, ... }: pkgs.writeShellApplication { - name = "nixfiles-system-upgrade"; - text = builtins.readFile ./nixfiles-system-upgrade.sh; + name = "clerie-system-upgrade"; + text = builtins.readFile ./clerie-system-upgrade.sh; runtimeInputs = with pkgs; [ curl jq diff --git a/pkgs/nixfiles/nixfiles-system-upgrade.sh b/pkgs/clerie-system-upgrade/clerie-system-upgrade.sh similarity index 95% rename from pkgs/nixfiles/nixfiles-system-upgrade.sh rename to pkgs/clerie-system-upgrade/clerie-system-upgrade.sh index 18e8e6b..7e2ad11 100755 --- a/pkgs/nixfiles/nixfiles-system-upgrade.sh +++ b/pkgs/clerie-system-upgrade/clerie-system-upgrade.sh @@ -55,7 +55,7 @@ echo "Set as boot target" if [[ -n "$NODE_EXPORTER_METRICS_PATH" ]]; then echo "Write monitoring check data" - echo "nixfiles_system_upgrade_last_check $(date +%s)" > "$NODE_EXPORTER_METRICS_PATH" + echo "clerie_system_upgrade_last_check $(date +%s)" > "$NODE_EXPORTER_METRICS_PATH" fi BOOTED_SYSTEM_KERNEL="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})" diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 530c957..5a0267f 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -1,4 +1,5 @@ final: prev: { + clerie-system-upgrade = final.callPackage ./clerie-system-upgrade/clerie-system-upgrade.nix {}; chromium-incognito = final.callPackage ./chromium-incognito {}; iot-data = final.python3.pkgs.callPackage ./iot-data {}; nix-remove-result-links = final.callPackage ./nix-remove-result-links {}; @@ -6,7 +7,6 @@ final: prev: { nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {}; nixfiles-generate-backup-secrets = final.callPackage ./nixfiles/nixfiles-generate-backup-secrets.nix {}; nixfiles-generate-config = final.callPackage ./nixfiles/nixfiles-generate-config.nix {}; - nixfiles-system-upgrade = final.callPackage ./nixfiles/nixfiles-system-upgrade.nix {}; nixfiles-updated-inputs = final.callPackage ./nixfiles/nixfiles-updated-inputs.nix {}; nixfiles-update-ssh-host-keys = final.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {}; update-from-hydra = final.callPackage ./update-from-hydra {};