From 01b1ce3caaf26f90c084d4b356053a2d79fcb9fa Mon Sep 17 00:00:00 2001 From: clerie Date: Fri, 1 Dec 2023 18:02:44 +0100 Subject: [PATCH] pkgs/nixfiles: rename nixfiles-system-sync-to-hydra to nixfiles-system-upgrade --- flake.nix | 2 +- hosts/dn42-il-gw1/configuration.nix | 2 +- hosts/dn42-il-gw5/configuration.nix | 2 +- hosts/dn42-il-gw6/configuration.nix | 2 +- hosts/nonat/configuration.nix | 2 +- modules/default.nix | 2 +- ...auto-sync-to-hydra.nix => nixfiles-system-upgrade.nix} | 8 ++++---- ...stem-sync-to-hydra.nix => nixfiles-system-upgrade.nix} | 4 ++-- ...system-sync-to-hydra.sh => nixfiles-system-upgrade.sh} | 0 pkgs/overlay.nix | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) rename modules/nixfiles/{system-auto-sync-to-hydra.nix => nixfiles-system-upgrade.nix} (55%) rename pkgs/nixfiles/{nixfiles-system-sync-to-hydra.nix => nixfiles-system-upgrade.nix} (50%) rename pkgs/nixfiles/{nixfiles-system-sync-to-hydra.sh => nixfiles-system-upgrade.sh} (100%) diff --git a/flake.nix b/flake.nix index 9830c65..3ae7d60 100644 --- a/flake.nix +++ b/flake.nix @@ -107,7 +107,7 @@ nixfiles-auto-install nixfiles-generate-backup-secrets nixfiles-generate-config - nixfiles-system-sync-to-hydra + nixfiles-system-upgrade nixfiles-updated-inputs nixfiles-update-ssh-host-keys nixos-firewall-tool diff --git a/hosts/dn42-il-gw1/configuration.nix b/hosts/dn42-il-gw1/configuration.nix index ea58042..35118d9 100644 --- a/hosts/dn42-il-gw1/configuration.nix +++ b/hosts/dn42-il-gw1/configuration.nix @@ -329,7 +329,7 @@ } ''; - clerie.nixfiles.system-auto-sync-to-hydra = { + clerie.nixfiles.system-auto-upgrade = { enable = true; allowReboot = true; }; diff --git a/hosts/dn42-il-gw5/configuration.nix b/hosts/dn42-il-gw5/configuration.nix index 4d28052..9b0295d 100644 --- a/hosts/dn42-il-gw5/configuration.nix +++ b/hosts/dn42-il-gw5/configuration.nix @@ -183,7 +183,7 @@ } ''; - clerie.nixfiles.system-auto-sync-to-hydra = { + clerie.nixfiles.system-auto-upgrade = { enable = true; allowReboot = true; }; diff --git a/hosts/dn42-il-gw6/configuration.nix b/hosts/dn42-il-gw6/configuration.nix index 15837c2..03be38d 100644 --- a/hosts/dn42-il-gw6/configuration.nix +++ b/hosts/dn42-il-gw6/configuration.nix @@ -183,7 +183,7 @@ } ''; - clerie.nixfiles.system-auto-sync-to-hydra = { + clerie.nixfiles.system-auto-upgrade = { enable = true; allowReboot = true; }; diff --git a/hosts/nonat/configuration.nix b/hosts/nonat/configuration.nix index 3dde127..8c8e4e8 100644 --- a/hosts/nonat/configuration.nix +++ b/hosts/nonat/configuration.nix @@ -39,7 +39,7 @@ networking.firewall.allowedUDPPorts = []; - clerie.nixfiles.system-auto-sync-to-hydra = { + clerie.nixfiles.system-auto-upgrade = { enable = true; allowReboot = true; }; diff --git a/modules/default.nix b/modules/default.nix index c43aede..08b5ed4 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,7 +13,7 @@ ./monitoring ./nginx-port-forward ./nixfiles - ./nixfiles/system-auto-sync-to-hydra.nix + ./nixfiles/nixfiles-system-upgrade.nix ./update-from-hydra ./wg-clerie ./wireguard-initrd diff --git a/modules/nixfiles/system-auto-sync-to-hydra.nix b/modules/nixfiles/nixfiles-system-upgrade.nix similarity index 55% rename from modules/nixfiles/system-auto-sync-to-hydra.nix rename to modules/nixfiles/nixfiles-system-upgrade.nix index 3d41ea1..a848a92 100644 --- a/modules/nixfiles/system-auto-sync-to-hydra.nix +++ b/modules/nixfiles/nixfiles-system-upgrade.nix @@ -3,12 +3,12 @@ with lib; let - cfg = config.clerie.nixfiles.system-auto-sync-to-hydra; + cfg = config.clerie.nixfiles.system-auto-upgrade; in { options = { - clerie.nixfiles.system-auto-sync-to-hydra = { + clerie.nixfiles.system-auto-upgrade = { enable = mkEnableOption "clerie nixfiles tools"; allowReboot = mkOption { type = types.bool; @@ -18,10 +18,10 @@ in }; }; config = mkIf cfg.enable { - systemd.services.nixfiles-system-auto-sync-to-hydra = { + systemd.services.nixfiles-system-auto-upgrade = { serviceConfig = { Type = "oneshot"; - ExecStart = pkgs.nixfiles-system-sync-to-hydra + "/bin/nixfiles-system-sync-to-hydra${optionalString cfg.allowReboot " --allow-reboot"}"; + ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade${optionalString cfg.allowReboot " --allow-reboot"}"; }; startAt = "*-*-* 06:47:00"; }; diff --git a/pkgs/nixfiles/nixfiles-system-sync-to-hydra.nix b/pkgs/nixfiles/nixfiles-system-upgrade.nix similarity index 50% rename from pkgs/nixfiles/nixfiles-system-sync-to-hydra.nix rename to pkgs/nixfiles/nixfiles-system-upgrade.nix index 41c32d2..9d494f4 100644 --- a/pkgs/nixfiles/nixfiles-system-sync-to-hydra.nix +++ b/pkgs/nixfiles/nixfiles-system-upgrade.nix @@ -1,8 +1,8 @@ { pkgs, ... }: pkgs.writeShellApplication { - name = "nixfiles-system-sync-to-hydra"; - text = builtins.readFile ./nixfiles-system-sync-to-hydra.sh; + name = "nixfiles-system-upgrade"; + text = builtins.readFile ./nixfiles-system-upgrade.sh; runtimeInputs = with pkgs; [ curl jq diff --git a/pkgs/nixfiles/nixfiles-system-sync-to-hydra.sh b/pkgs/nixfiles/nixfiles-system-upgrade.sh similarity index 100% rename from pkgs/nixfiles/nixfiles-system-sync-to-hydra.sh rename to pkgs/nixfiles/nixfiles-system-upgrade.sh diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 2d5ffdf..743818a 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -6,7 +6,7 @@ self: super: { nixfiles-auto-install = self.callPackage ./nixfiles/nixfiles-auto-install.nix {}; nixfiles-generate-backup-secrets = self.callPackage ./nixfiles/nixfiles-generate-backup-secrets.nix {}; nixfiles-generate-config = self.callPackage ./nixfiles/nixfiles-generate-config.nix {}; - nixfiles-system-sync-to-hydra = self.callPackage ./nixfiles/nixfiles-system-sync-to-hydra.nix {}; + nixfiles-system-upgrade = self.callPackage ./nixfiles/nixfiles-system-upgrade.nix {}; nixfiles-updated-inputs = self.callPackage ./nixfiles/nixfiles-updated-inputs.nix {}; nixfiles-update-ssh-host-keys = self.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {}; nixos-firewall-tool = self.callPackage ./nixos-firewall-tool {};