From 51472e812a2862fd856a164ff5af8e6bf48c1242 Mon Sep 17 00:00:00 2001 From: materus Date: Wed, 7 Jun 2023 01:52:01 +0200 Subject: [PATCH] materusPC: valkyrie rebuild scripts --- configurations/host/materusPC/scripts.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/configurations/host/materusPC/scripts.nix b/configurations/host/materusPC/scripts.nix index 215cf44..7fda83c 100644 --- a/configurations/host/materusPC/scripts.nix +++ b/configurations/host/materusPC/scripts.nix @@ -2,19 +2,30 @@ let valkyrie-sync = pkgs.writeShellScriptBin "valkyrie-sync" '' ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/Nixerus materus@valkyrie:/materus/config/ && \ -${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/valkyrie materus@valkyrie:/materus/config/ + ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" /materus/config/valkyrie materus@valkyrie:/materus/config/ ''; valkyrie-flakelock = pkgs.writeShellScriptBin "valkyrie-flakelock" '' ${pkgs.openssh}/bin/ssh materus@valkyrie "nix flake update /materus/config/Nixerus --override-input nixpkgs github:NixOS/nixpkgs/23.05 \ - --override-input home-manager github:nix-community/home-manager/release-23.05 \ - --override-input private /materus/config/valkyrie/flake" + --override-input home-manager github:nix-community/home-manager/release-23.05 \ + --override-input private /materus/config/valkyrie/flake" +''; + +valkyrie-rebuild-boot = pkgs.writeShellScriptBin "valkyrie-rebuild-boot" '' +${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild boot --flake /materus/config/Nixerus#valkyrie \ + --override-input private /materus/config/valkyrie/flake" +''; +valkyrie-rebuild-switch = pkgs.writeShellScriptBin "valkyrie-rebuild-switch" '' +${pkgs.openssh}/bin/ssh -t materus@valkyrie "sudo nixos-rebuild switch --flake /materus/config/Nixerus#valkyrie \ + --override-input private /materus/config/valkyrie/flake" ''; in { environment.systemPackages = [ + valkyrie-rebuild-boot + valkyrie-rebuild-switch valkyrie-sync valkyrie-flakelock ];