nixos/modules/common/nh.nix
2025-05-22 21:19:25 -04:00

23 lines
530 B
Nix

{
inputs,
pkgs,
lib,
...
}: let
pkg = inputs.nh.packages.${pkgs.system}.default;
exe = lib.getExe pkg;
in {
programs.nh = {
enable = true;
package = pkg;
clean.enable = true;
flake = "/home/quadradical/.config/nixos";
};
environment.shellAliases = {
clean = "${exe} clean all";
update = "pushd ~/.config/nixos && nix flake update && popd && rebuild";
rebuild = "${exe} os switch";
rebuildServer = "${exe} os switch --hostname quadraticserver --target-host 192.168.0.132";
};
}