mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2026-01-31 12:40:24 +00:00
Compare commits
2 commits
f2a6dee669
...
3c314ad5bd
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c314ad5bd | |||
| 213ce6601f |
6 changed files with 26 additions and 13 deletions
|
|
@ -11,8 +11,8 @@ My personal NixOS and home-manager configurations.
|
|||
```sh
|
||||
nix develop
|
||||
|
||||
just deploy-nixos # Rebuild and switch the current NixOS system on this host
|
||||
just deploy-home # Apply Home Manager configuration for the current user
|
||||
just deploy-vps # Rebuild and switch NixOS on the remote VPS
|
||||
just nixos # Rebuild and switch the current NixOS system on this host
|
||||
just home # Apply Home Manager configuration for the current user
|
||||
just vps # Rebuild and switch NixOS on the remote VPS
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
pkgs.git
|
||||
pkgs.git-crypt
|
||||
pkgs.just
|
||||
pkgs.nh
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@
|
|||
./ydotool.nix
|
||||
./steam.nix
|
||||
./nix-ld.nix
|
||||
./nh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
8
hosts/nixos/modules/programs/nh.nix
Normal file
8
hosts/nixos/modules/programs/nh.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 7d --keep 3";
|
||||
flake = "/home/toast/nix-config";
|
||||
};
|
||||
}
|
||||
21
justfile
21
justfile
|
|
@ -3,19 +3,20 @@
|
|||
default:
|
||||
@just --list
|
||||
|
||||
deploy-nixos:
|
||||
sudo nixos-rebuild switch --flake .#$(hostname)
|
||||
_check-nh:
|
||||
@command -v nh > /dev/null 2>&1 || echo "nh is not in PATH. Run 'nix develop' first."
|
||||
|
||||
deploy-vps:
|
||||
nixos-rebuild switch --flake .#vps --target-host root@vps
|
||||
nixos: _check-nh
|
||||
nh os switch .
|
||||
|
||||
deploy-home:
|
||||
home-manager switch --flake .#$USER@$(hostname)
|
||||
vps: _check-nh
|
||||
nh os switch . -H vps --target-host root@vps
|
||||
|
||||
home: _check-nh
|
||||
nh home switch .
|
||||
|
||||
update:
|
||||
nix flake update --commit-lock-file
|
||||
|
||||
gc:
|
||||
nix-collect-garbage -d
|
||||
nix-collect-garbage --delete-older-than 7d
|
||||
nix-store --gc
|
||||
gc: _check-nh
|
||||
nh clean all --keep-since 7d
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ pkgs.mkShell {
|
|||
git
|
||||
sops
|
||||
git-crypt
|
||||
just
|
||||
nh
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue