Rewrite deploy

This commit is contained in:
Greg Hellings
2025-07-02 12:01:33 -05:00
parent bc67c9b885
commit 6c4cc2cd30
2 changed files with 8 additions and 1 deletions
-1
View File
@@ -56,7 +56,6 @@
s = "nix run \".#runserver\"";
# Nix related ones
deploy = "nixos-rebuild switch --use-remote-sudo --use-substitutes --target-host";
gl-nging = "sudo nixos-container run gitlab -- systemctl restart nginx";
nb = "nix build -L";
nixdu = "sudo nix-store --gc --print-roots | egrep -v r\"^(/nix/var|/run/\\w+-system|\\{memory|/proc)\"";
+8
View File
@@ -63,6 +63,14 @@ def _rebuild(args):
popd
aliases['rebuild'] = _rebuild
def _deploy(args):
dest = args[0]
if dest != "linode":
nixos-rebuild switch --use-remote-sudo --use-substitutes --target-host @(dest) --build-host @(dest)
else:
nixos-rebuild swtich --use-remote-sudo --use-substitutes --target-host @(dest)
aliases['deploy'] = _deploy
def _yaml2json(args, stdin=None, stdout=None):
import sys, yaml, json
from yaml import CLoader