Files
vmimages/dotfiles/sstent/justfile
2024-09-03 18:33:41 +00:00

61 lines
1.8 KiB
Makefile

bootstrap-repos:
mr --trust-all bootstrap /run/user/1000/secrets/mrconfig
update-secret-mr:
#!/usr/bin/env bash
cd ~/vmimages
cp secrets/user_dotfiles/mrconfig secrets/user_dotfiles/mrconfig_old
cp ~/.mrconfig secrets/user_dotfiles/mrconfig
sops -e --input-type binary -i secrets/user_dotfiles/mrconfig
#Keep and eye on -https://github.com/getsops/sops/issues/594
# new version adds "--filename-override option
sops-updatekeys:
#!/usr/bin/env bash
cd ~/vmimages
sops updatekeys secrets/user-secrets.yaml
sops updatekeys secrets/host-secrets.yaml
sops updatekeys secrets/*.yaml
rebuild:
just rebuild_host
just rebuild_home
rebuild_host:
sudo nixos-rebuild switch --flake /home/sstent/vmimages/.#${HOSTNAME}
rebuild_home:
home-manager switch --flake /home/sstent/vmimages/.
systemctl --user restart sops-nix
rebuild_host_test:
sudo nixos-rebuild test --flake /home/sstent/vmimages/.#${HOSTNAME}
rebuild_home_test:
home-manager test --flake /home/sstent/vmimages/.
systemctl --user restart sops-nix
nix_list_generations:
sudo nix-env --list-generations -p /nix/var/nix/profiles/system
nomad_run SERVICE:
nomad run ~/projects/nomad/nomad_jobs/enabled/{{SERVICE}}.nomad
nomad_purge SERVICE:
nomad stop --purge {{SERVICE}}
nomad_stop SERVICE:
nomad stop ~/projects/nomad/nomad_jobs/enabled/{{SERVICE}}
nomad_exec_bash SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/bash
nomad_exec_sh SERVICE:
ID=$(nomad status {{SERVICE}} | grep "running" | grep "{{SERVICE}}" | head -n 1| awk '{print $1}'); nomad alloc exec -task {{SERVICE}} -t ${ID} /bin/sh
run_nicotine:
mullvad connect
-nix-shell -p nicotine-plus --command nicotine-plus
mullvad disconnect