mirror of
https://github.com/Cian-H/My_NixOS_Config.git
synced 2025-12-22 15:01:57 +00:00
Fresh start to clean history after subtree experiments
This commit is contained in:
34
justfile
Normal file
34
justfile
Normal file
@@ -0,0 +1,34 @@
|
||||
default:
|
||||
@just --list
|
||||
|
||||
prebuild:
|
||||
#!/usr/bin/env bash
|
||||
if `git status --short | /usr/bin/env grep \?\?`; then
|
||||
git add .
|
||||
fi
|
||||
git pull
|
||||
nix flake update
|
||||
|
||||
_update-root:
|
||||
if `/usr/bin/env grep -Rq "nixos" /etc/*-release`; then \
|
||||
sudo nixos-rebuild switch --flake .#$HOSTNAME; \
|
||||
fi
|
||||
|
||||
update-root: prebuild _update-root
|
||||
|
||||
install-home:
|
||||
home-manager switch --flake .#$USER@core \
|
||||
--extra-experimental-features nix-command \
|
||||
--extra-experimental-features flakes
|
||||
|
||||
_update-home:
|
||||
home-manager switch --flake .#$USER@$HOSTNAME \
|
||||
|| home-manager switch --flake .#$USER@core
|
||||
|
||||
update-home: prebuild _update-home
|
||||
|
||||
update: prebuild _update-root _update-home
|
||||
|
||||
cleanup:
|
||||
nix-store --gc
|
||||
nix-store --optimise
|
||||
Reference in New Issue
Block a user