diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..16440547 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +activate: + nh os switch -H pc . diff --git a/flake.lock b/flake.lock index 16d4cbce..a1aba7b5 100644 --- a/flake.lock +++ b/flake.lock @@ -189,11 +189,11 @@ ] }, "locked": { - "lastModified": 1727826117, - "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "lastModified": 1730504689, + "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "rev": "506278e768c2a08bec68eb62932193e341f55c90", "type": "github" }, "original": { @@ -270,11 +270,11 @@ ] }, "locked": { - "lastModified": 1729104314, - "narHash": "sha256-pZRZsq5oCdJt3upZIU4aslS9XwFJ+/nVtALHIciX/BI=", + "lastModified": 1730302582, + "narHash": "sha256-W1MIJpADXQCgosJZT8qBYLRuZls2KSiKdpnTVdKBuvU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "3c3e88f0f544d6bb54329832616af7eb971b6be6", + "rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf", "type": "github" }, "original": { @@ -432,11 +432,11 @@ ] }, "locked": { - "lastModified": 1729826725, - "narHash": "sha256-w3WNlYxqWYsuzm/jgFPyhncduoDNjot28aC8j39TW0U=", + "lastModified": 1730448474, + "narHash": "sha256-qE/cYKBhzxHMtKtLK3hlSR3uzO1pWPGLrBuQK7r0CHc=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "7840909b00fbd5a183008a6eb251ea307fe4a76e", + "rev": "683d0c4cd1102dcccfa3f835565378c7f3cbe05e", "type": "github" }, "original": { @@ -552,11 +552,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1729691686, - "narHash": "sha256-BAuPWW+9fa1moZTU+jFh+1cUtmsuF8asgzFwejM4wac=", + "lastModified": 1730327045, + "narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32e940c7c420600ef0d1ef396dc63b04ee9cad37", + "rev": "080166c15633801df010977d9d7474b4a6c549d7", "type": "github" }, "original": { @@ -618,11 +618,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1729945968, - "narHash": "sha256-4u+nbBSMuXWGCtXxUPPEflRm54+y/HLIbhIep9do8Ew=", + "lastModified": 1730550779, + "narHash": "sha256-2stntmqw/GBOVEoPV4oCLHZljpeSBfZn8wkcJpei+ng=", "owner": "nix-community", "repo": "nixvim", - "rev": "c05ac01070425ed0797b1ff678dc690c333cea74", + "rev": "91c06026075f08a3c865fdc46cc6db8e2af35a1e", "type": "github" }, "original": { @@ -715,11 +715,11 @@ ] }, "locked": { - "lastModified": 1729613947, - "narHash": "sha256-XGOvuIPW1XRfPgHtGYXd5MAmJzZtOuwlfKDgxX5KT3s=", + "lastModified": 1730321837, + "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "aac86347fb5063960eccb19493e0cadcdb4205ca", + "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", "type": "github" }, "original": { diff --git a/hosts/pc/configuration.nix b/hosts/pc/configuration.nix index 500535ae..2451a6c1 100644 --- a/hosts/pc/configuration.nix +++ b/hosts/pc/configuration.nix @@ -37,7 +37,7 @@ rec { auto-optimise-store = true; }; gc = { - automatic = true; + automatic = !programs.nh.enable; dates = "weekly"; options = "--delete-older-than 7d"; }; @@ -174,6 +174,13 @@ rec { }; programs = { + nh = { + enable = true; + clean = { + enable = true; + extraArgs = nix.gc.options; + }; + }; fish.enable = true; file-roller.enable = true; # Archive explorer evince.enable = true; # PDF viever @@ -277,7 +284,7 @@ rec { neovim.wittano.enable = true; fish.shellAliases = { - re = "sudo nixos-rebuild switch --flake ${environment.variables.NIX_DOTFILES}#${hostname}"; + re = "nh os switch ${environment.variables.NIX_DOTFILES}"; # Projects pnix = "cd $HOME/nix-dotfiles"; plab = "cd $HOME/projects/server/home-lab";