feat: added remote rebuild command for lamdagibson

This commit is contained in:
Nick 2025-10-21 19:42:36 -05:00
parent 45fb39b945
commit b91e543ca8

View file

@ -31,40 +31,47 @@ let
); );
in in
{ {
text = '' text =
rebuildBoot: let
nixos-rebuild boot --sudo --flake ~/projects/dotfiles#${hostname} --show-trace lamdaIP = "192.168.50.131";
in
''
rebuildBoot:
nixos-rebuild boot --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
rebuild: rebuild:
nixos-rebuild switch --sudo --flake ~/projects/dotfiles#${hostname} --show-trace nixos-rebuild switch --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
rebuild-server: rebuild-server:
nixos-rebuild switch --flake ~/projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password nixos-rebuild switch --flake ~/projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password
update: rebuild-lamda:
nix flake update --flake ~/projects/dotfiles nixos-rebuild switch --flake ~/projects/lamdagibson#lamdagibson --target-host denise@${lamdaIP} --sudo --ask-sudo-password
remove-redundant: update:
ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name } nix flake update --flake ~/projects/dotfiles
remove-imports: remove-redundant:
ls **/*.hs | each { |file| ormolu --mode inplace $file.name } ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name }
server: remove-imports:
ssh ${ceres.ip.address0} ls **/*.hs | each { |file| ormolu --mode inplace $file.name }
lamda: server:
ssh denise@192.168.50.131 ssh ${ceres.ip.address0}
serverRemote: lamda:
ssh ${instances.web.remotehost.address0} ssh denise@${lamdaIP}
${deviceLogic.name}: serverRemote:
ssh ${deviceLogic.ip.address0} ssh ${instances.web.remotehost.address0}
vpnoff: ${deviceLogic.name}:
sudo systemctl stop wg-quick-Proton-*.service ssh ${deviceLogic.ip.address0}
${vpnCommands} vpnoff:
''; sudo systemctl stop wg-quick-Proton-*.service
${vpnCommands}
'';
} }