feat: cleaned up justfile

This commit is contained in:
Nick 2025-04-01 21:55:33 -05:00
parent 41e7d1efe0
commit f2078bde2b

View file

@ -53,23 +53,26 @@ in
mars = devices.mars;
deimos = devices.deimos;
deviceLogic = if hostname == mars.name then deimos else mars;
vpnServers = [
"CA363"
"CA220"
"CA358"
"CA627"
];
vpnCommands = lib.concatStrings (
lib.imap0 (i: server: ''
vpn${toString i}:
sudo systemctl start wg-quick-Proton-${server}.service
'') vpnServers
);
in
{
text = ''
vpn0:
sudo systemctl start wg-quick-Proton-CA363.service
vpn1:
sudo systemctl start wg-quick-Proton-CA220.service
vpn2:
sudo systemctl start wg-quick-Proton-CA358.service
vpn3:
sudo systemctl start wg-quick-Proton-CA627.service
vpnoff:
sudo systemctl stop wg-quick-Proton-*.service
rebuildboot:
nixos-rebuild boot --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
rebuild:
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
@ -85,6 +88,11 @@ in
${deviceLogic.name}:
ssh ${deviceLogic.ip.address0}
vpnoff:
sudo systemctl stop wg-quick-Proton-*.service
${vpnCommands}
'';
};
"./Files/Scripts/list.sh" = {