materusPC: valkyrie rebuild scripts

This commit is contained in:
Mateusz Słodkowicz 2023-06-07 01:52:01 +02:00
parent 7e3954506d
commit 51472e812a
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 14 additions and 3 deletions

View File

@ -2,7 +2,7 @@
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" ''
@ -11,10 +11,21 @@ ${pkgs.openssh}/bin/ssh materus@valkyrie "nix flake update /materus/config/Nixer
--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
];