mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 09:35:12 -05:00
feat: cleaned up justfile
This commit is contained in:
parent
41e7d1efe0
commit
f2078bde2b
1 changed files with 22 additions and 14 deletions
|
@ -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" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue