diff --git a/flake.lock b/flake.lock index a15c4db..5e65aaf 100644 --- a/flake.lock +++ b/flake.lock @@ -53,6 +53,27 @@ } }, "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nix-direnv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768135262, + "narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "nur", @@ -177,6 +198,28 @@ "type": "github" } }, + "nix-direnv": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1768704530, + "narHash": "sha256-BASsdRYo8t/himZisgWW524t86pxuC0H3/Dv8sqR8sM=", + "owner": "nix-community", + "repo": "nix-direnv", + "rev": "29bb68202897f6e8653d28f64c5525c2c502f19c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-direnv", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1769302137, @@ -259,7 +302,7 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts_3", "nixpkgs": "nixpkgs_3" }, "locked": { @@ -308,11 +351,12 @@ "lanzaboote": "lanzaboote", "mysecrets": "mysecrets", "nix-darwin": "nix-darwin", + "nix-direnv": "nix-direnv", "nixos-hardware": "nixos-hardware", "nixos-unstable": "nixos-unstable", "nixpkgs": "nixpkgs_2", "nur": "nur", - "treefmt-nix": "treefmt-nix", + "treefmt-nix": "treefmt-nix_2", "utils": "utils" } }, @@ -353,6 +397,27 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nix-direnv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768158989, + "narHash": "sha256-67vyT1+xClLldnumAzCTBvU0jLZ1YBcf4vANRWP3+Ak=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "e96d59dff5c0d7fddb9d113ba108f03c3ef99eca", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "nixpkgs" diff --git a/flake.nix b/flake.nix index 7fd80f4..567a2c6 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,11 @@ flake = false; url = "git+ssh://gitea@git.orlives.de:2342/schmittlauch/home-manager_secrets.git"; }; + nix-direnv = { + url = "github:nix-community/nix-direnv"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = diff --git a/home/common.nix b/home/common.nix index 0df7d8f..1bce7b0 100644 --- a/home/common.nix +++ b/home/common.nix @@ -19,7 +19,11 @@ programs.bat.enable = true; programs.direnv = { enable = true; - nix-direnv.enable = true; + nix-direnv = { + enable = true; + # use a more recent nix-direnv to get the _nix_refresh_gcroots integration + package = inputs.nix-direnv.packages."${pkgs.stdenv.hostPlatform.system}".nix-direnv; + }; enableZshIntegration = true; };