diff --git a/README.md b/README.md index 61656d9..0578cbe 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ My personal NixOS and home-manager configurations. ```sh nix develop -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 +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 ``` diff --git a/flake.nix b/flake.nix index 1c23e61..235b538 100644 --- a/flake.nix +++ b/flake.nix @@ -90,7 +90,6 @@ pkgs.git pkgs.git-crypt pkgs.just - pkgs.nh ]; }; } diff --git a/hosts/nixos/modules/programs/default.nix b/hosts/nixos/modules/programs/default.nix index e9c8523..f65c351 100644 --- a/hosts/nixos/modules/programs/default.nix +++ b/hosts/nixos/modules/programs/default.nix @@ -10,6 +10,5 @@ ./ydotool.nix ./steam.nix ./nix-ld.nix - ./nh.nix ]; } diff --git a/hosts/nixos/modules/programs/nh.nix b/hosts/nixos/modules/programs/nh.nix deleted file mode 100644 index dd2f39d..0000000 --- a/hosts/nixos/modules/programs/nh.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - programs.nh = { - enable = true; - clean.enable = true; - clean.extraArgs = "--keep-since 7d --keep 3"; - flake = "/home/toast/nix-config"; - }; -} diff --git a/justfile b/justfile index ff93cdf..10fa05a 100644 --- a/justfile +++ b/justfile @@ -3,20 +3,19 @@ default: @just --list -_check-nh: - @command -v nh > /dev/null 2>&1 || echo "nh is not in PATH. Run 'nix develop' first." +deploy-nixos: + sudo nixos-rebuild switch --flake .#$(hostname) -nixos: _check-nh - nh os switch . +deploy-vps: + nixos-rebuild switch --flake .#vps --target-host root@vps -vps: _check-nh - nh os switch . -H vps --target-host root@vps - -home: _check-nh - nh home switch . +deploy-home: + home-manager switch --flake .#$USER@$(hostname) update: nix flake update --commit-lock-file -gc: _check-nh - nh clean all --keep-since 7d +gc: + nix-collect-garbage -d + nix-collect-garbage --delete-older-than 7d + nix-store --gc diff --git a/shell.nix b/shell.nix index 9df72f3..36dd381 100644 --- a/shell.nix +++ b/shell.nix @@ -7,7 +7,5 @@ pkgs.mkShell { git sops git-crypt - just - nh ]; }