mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
70 lines
1.7 KiB
Nix
Executable file
70 lines
1.7 KiB
Nix
Executable file
{
|
|
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;
|
|
|
|
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}
|
|
|
|
forgejo:
|
|
ssh root@${instances.forgejo.interface.ip}
|
|
|
|
${deviceLogic.name}:
|
|
ssh ${deviceLogic.ip.address0}
|
|
|
|
|
|
'';
|
|
}
|