From eba012003c53a99798a78f8e812103b348283d38 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 19 Aug 2024 07:13:46 +0100 Subject: [PATCH] Add shellAliases to sync and either shutdown or reboot --- home/scripts/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/home/scripts/default.nix b/home/scripts/default.nix index 74a264a8..aa8df729 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -6,8 +6,14 @@ (pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh)) (pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.sh)) ]; - shellAliases = { - gsa = "git-sync-all"; - }; + shellAliases = + let + sync = "sudo systemctl start nixos-upgrade.service && git-sync-all"; + in + { + gsa = "git-sync-all"; + sync-and-shutdown = sync + " && shutdown now"; + sync-and-reboot = sync + " && reboot"; + }; }; }