dotfiles/profiles/user0/files/misc/justfile.nix

74 lines
2 KiB
Nix
Raw Normal View History

2025-10-01 19:51:55 -05:00
{
flake,
config,
lib,
...
}:
let
inherit (flake.config.machines) devices;
inherit (flake.config.services) instances;
mars = devices.mars;
deimos = devices.deimos;
ceres = devices.ceres;
2025-10-24 20:52:04 -05:00
eris = devices.eris;
2025-10-01 19:51:55 -05:00
hostname = config.networking.hostName;
in
{
text =
let
lamdaIP = "192.168.50.131";
in
''
rebuildBoot:
nixos-rebuild boot --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
2025-10-01 19:51:55 -05:00
rebuild:
nixos-rebuild switch --sudo --flake ~/projects/dotfiles#${hostname} --show-trace
2025-10-01 19:51:55 -05:00
2025-10-24 20:52:04 -05:00
rebuild-ceres:
nixos-rebuild switch --flake ~/projects/dotfiles#${ceres.name} --target-host ${ceres.ip.address0} --sudo --ask-sudo-password --show-trace
2025-10-01 19:51:55 -05:00
2025-10-24 20:52:04 -05:00
rebuild-eris:
nixos-rebuild switch --flake ~/projects/dotfiles#${eris.name} --target-host ${eris.ip.address0} --sudo --ask-sudo-password --show-trace
2025-10-24 20:52:04 -05:00
2025-11-11 22:56:46 -06:00
rebuild-mars:
nixos-rebuild switch --flake ~/projects/dotfiles#${mars.name} --target-host ${mars.ip.address0} --sudo --ask-sudo-password --show-trace
rebuild-deimos:
nixos-rebuild switch --flake ~/projects/dotfiles#${deimos.name} --target-host ${deimos.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
2025-10-01 19:51:55 -05:00
update:
nix flake update --flake ~/projects/dotfiles
2025-10-01 19:51:55 -05:00
remove-redundant:
ls **/*.hs | each { |file| hlint --refactor --refactor-options="--inplace" $file.name }
2025-10-01 19:51:55 -05:00
remove-imports:
ls **/*.hs | each { |file| ormolu --mode inplace $file.name }
2025-10-01 19:51:55 -05:00
ceres:
ssh ${ceres.ip.address0}
2025-10-17 14:59:59 -05:00
eris:
ssh ${eris.ip.address0}
2025-11-11 22:56:46 -06:00
deimos:
ssh ${deimos.ip.address0}
lamda:
ssh denise@${lamdaIP}
2025-10-01 19:51:55 -05:00
serverRemote:
ssh ${instances.web.remotehost.address0}
2025-10-01 19:51:55 -05:00
2025-11-04 03:30:52 -06:00
forgejo:
ssh root@${instances.forgejo.interface.ip}
'';
2025-10-01 19:51:55 -05:00
}