{ flake, config, lib, ... }: let inherit (flake.config.machines) devices; inherit (flake.config.services) instances; mars = devices.mars; deimos = devices.deimos; ceres = devices.ceres; eris = devices.eris; hostname = config.networking.hostName; 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 = let lamdaIP = "192.168.50.131"; in '' rebuildBoot: nixos-rebuild boot --sudo --flake ~/projects/dotfiles#${hostname} --show-trace rebuild: nixos-rebuild switch --sudo --flake ~/projects/dotfiles#${hostname} --show-trace rebuild-ceres: nixos-rebuild switch --flake ~/projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password --show-trace rebuild-eris: nixos-rebuild switch --flake ~/projects/dotfiles#${eris.name} --target-host ${eris.ip.address0} --sudo --ask-sudo-password --show-trace rebuild-lamda: nixos-rebuild switch --flake ~/projects/lamdagibson#lamdagibson --target-host denise@${lamdaIP} --sudo --ask-sudo-password --show-trace update: nix flake update --flake ~/projects/dotfiles remove-redundant: ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name } remove-imports: ls **/*.hs | each { |file| ormolu --mode inplace $file.name } ceres: ssh ${ceres.ip.address0} eris: ssh ${eris.ip.address0} lamda: ssh denise@${lamdaIP} serverRemote: ssh ${instances.web.remotehost.address0} ${deviceLogic.name}: ssh ${deviceLogic.ip.address0} vpnoff: sudo systemctl stop wg-quick-Proton-*.service ${vpnCommands} ''; }