Rewrite deploy
This commit is contained in:
@@ -56,7 +56,6 @@
|
|||||||
s = "nix run \".#runserver\"";
|
s = "nix run \".#runserver\"";
|
||||||
|
|
||||||
# Nix related ones
|
# Nix related ones
|
||||||
deploy = "nixos-rebuild switch --use-remote-sudo --use-substitutes --target-host";
|
|
||||||
gl-nging = "sudo nixos-container run gitlab -- systemctl restart nginx";
|
gl-nging = "sudo nixos-container run gitlab -- systemctl restart nginx";
|
||||||
nb = "nix build -L";
|
nb = "nix build -L";
|
||||||
nixdu = "sudo nix-store --gc --print-roots | egrep -v r\"^(/nix/var|/run/\\w+-system|\\{memory|/proc)\"";
|
nixdu = "sudo nix-store --gc --print-roots | egrep -v r\"^(/nix/var|/run/\\w+-system|\\{memory|/proc)\"";
|
||||||
|
|||||||
@@ -63,6 +63,14 @@ def _rebuild(args):
|
|||||||
popd
|
popd
|
||||||
aliases['rebuild'] = _rebuild
|
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):
|
def _yaml2json(args, stdin=None, stdout=None):
|
||||||
import sys, yaml, json
|
import sys, yaml, json
|
||||||
from yaml import CLoader
|
from yaml import CLoader
|
||||||
|
|||||||
Reference in New Issue
Block a user