mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-15 17:45: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;
|
mars = devices.mars;
|
||||||
deimos = devices.deimos;
|
deimos = devices.deimos;
|
||||||
deviceLogic = if hostname == mars.name then deimos else mars;
|
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
|
in
|
||||||
{
|
{
|
||||||
text = ''
|
text = ''
|
||||||
vpn0:
|
rebuildboot:
|
||||||
sudo systemctl start wg-quick-Proton-CA363.service
|
nixos-rebuild boot --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
|
nixos-rebuild switch --use-remote-sudo --flake ~/Files/Projects/dotfiles#${hostname} --show-trace
|
||||||
|
@ -85,6 +88,11 @@ in
|
||||||
|
|
||||||
${deviceLogic.name}:
|
${deviceLogic.name}:
|
||||||
ssh ${deviceLogic.ip.address0}
|
ssh ${deviceLogic.ip.address0}
|
||||||
|
|
||||||
|
vpnoff:
|
||||||
|
sudo systemctl stop wg-quick-Proton-*.service
|
||||||
|
|
||||||
|
${vpnCommands}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"./Files/Scripts/list.sh" = {
|
"./Files/Scripts/list.sh" = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue