diff --git a/flake.lock b/flake.lock index 35c4b5e6..371c3c6f 100644 --- a/flake.lock +++ b/flake.lock @@ -276,6 +276,30 @@ "type": "github" } }, + "nix-direnv": { + "inputs": { + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1724328508, + "narHash": "sha256-apY9HpJVXitcnX2s3dJi6rCAMQBI5y0QIebWfzTQ2d4=", + "owner": "nix-community", + "repo": "nix-direnv", + "rev": "7272fa949e26457146663cdb2cec4d57c7a1f296", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-direnv", + "type": "github" + } + }, "nixos-22-05": { "locked": { "lastModified": 1685573264, @@ -360,6 +384,7 @@ "invoiceplane-template": "invoiceplane-template", "lix-module": "lix-module", "nix-darwin": "nix-darwin", + "nix-direnv": "nix-direnv", "nixos-22-05": "nixos-22-05", "nixos-flake": "nixos-flake", "nixos-hardware": "nixos-hardware", @@ -431,6 +456,27 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nix-direnv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1723808491, + "narHash": "sha256-rhis3qNuGmJmYC/okT7Dkc4M8CeUuRCSvW6kC2f3hBc=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "1d07739554fdc4f8481068f1b11d6ab4c1a4167a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { "inputs": { "nixpkgs": [ "wayland-pipewire-idle-inhibit", @@ -540,7 +586,7 @@ "nixpkgs": [ "nixpkgs" ], - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_2" }, "locked": { "lastModified": 1724040047, diff --git a/flake.nix b/flake.nix index 3a0f7c9e..dc03b9a4 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,10 @@ agenix.inputs.darwin.follows = "nix-darwin"; agenix.inputs.home-manager.follows = "home-manager"; + nix-direnv.url = "github:nix-community/nix-direnv"; + nix-direnv.inputs.nixpkgs.follows = "nixpkgs"; + nix-direnv.inputs.flake-parts.follows = "flake-parts"; + nixos-hardware.url = "github:nixos/nixos-hardware"; lix-module = { diff --git a/modules/terminal-life/default.nix b/modules/terminal-life/default.nix index 0312238c..3711f7ca 100644 --- a/modules/terminal-life/default.nix +++ b/modules/terminal-life/default.nix @@ -131,7 +131,7 @@ in inherit pkgs; }; - programs.direnv = import ./direnv { }; + programs.direnv = import ./direnv { inherit pkgs flake; }; }; }; } diff --git a/modules/terminal-life/direnv/default.nix b/modules/terminal-life/direnv/default.nix index 0143c839..8c87877f 100644 --- a/modules/terminal-life/direnv/default.nix +++ b/modules/terminal-life/direnv/default.nix @@ -1,7 +1,8 @@ -{ ... }: +{ pkgs, flake, ... }: { enable = true; nix-direnv = { enable = true; + package = flake.inputs.nix-direnv.packages.${pkgs.system}.nix-direnv; }; }