Compare commits

..

2 commits

Author SHA1 Message Date
3c314ad5bd refactor(just): rename deploy commands to shorter aliases
- Renamed justfile commands from deploy-* to concise names
- Updated README examples
2026-01-17 12:20:21 +09:00
213ce6601f feat: add nh
- Updated justfile to use nh for deploy commands
- Added nh to flake devShell
- Added nh and just to shell.nix
- Enabled programs.nh in nixos
2026-01-17 12:10:57 +09:00
6 changed files with 26 additions and 13 deletions

View file

@ -11,8 +11,8 @@ My personal NixOS and home-manager configurations.
```sh ```sh
nix develop nix develop
just deploy-nixos # Rebuild and switch the current NixOS system on this host just nixos # Rebuild and switch the current NixOS system on this host
just deploy-home # Apply Home Manager configuration for the current user just home # Apply Home Manager configuration for the current user
just deploy-vps # Rebuild and switch NixOS on the remote VPS just vps # Rebuild and switch NixOS on the remote VPS
``` ```

View file

@ -90,6 +90,7 @@
pkgs.git pkgs.git
pkgs.git-crypt pkgs.git-crypt
pkgs.just pkgs.just
pkgs.nh
]; ];
}; };
} }

View file

@ -10,5 +10,6 @@
./ydotool.nix ./ydotool.nix
./steam.nix ./steam.nix
./nix-ld.nix ./nix-ld.nix
./nh.nix
]; ];
} }

View file

@ -0,0 +1,8 @@
{
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 7d --keep 3";
flake = "/home/toast/nix-config";
};
}

View file

@ -3,19 +3,20 @@
default: default:
@just --list @just --list
deploy-nixos: _check-nh:
sudo nixos-rebuild switch --flake .#$(hostname) @command -v nh > /dev/null 2>&1 || echo "nh is not in PATH. Run 'nix develop' first."
deploy-vps: nixos: _check-nh
nixos-rebuild switch --flake .#vps --target-host root@vps nh os switch .
deploy-home: vps: _check-nh
home-manager switch --flake .#$USER@$(hostname) nh os switch . -H vps --target-host root@vps
home: _check-nh
nh home switch .
update: update:
nix flake update --commit-lock-file nix flake update --commit-lock-file
gc: gc: _check-nh
nix-collect-garbage -d nh clean all --keep-since 7d
nix-collect-garbage --delete-older-than 7d
nix-store --gc

View file

@ -7,5 +7,7 @@ pkgs.mkShell {
git git
sops sops
git-crypt git-crypt
just
nh
]; ];
} }