diff --git a/flake.lock b/flake.lock index 32402df..63b4016 100644 --- a/flake.lock +++ b/flake.lock @@ -54,6 +54,27 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "flake_env", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "lanzaboote", @@ -110,6 +131,28 @@ "type": "github" } }, + "flake_env": { + "inputs": { + "flake-parts": "flake-parts", + "nix-filter": "nix-filter", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704308731, + "narHash": "sha256-OEEFi+rPrkpJYRzmp62nSmrGwb+H/nA4fgGEqj6h7oY=", + "ref": "refs/heads/main", + "rev": "31cac9373c708a99698f461006f94e3216e53d04", + "revCount": 13, + "type": "git", + "url": "https://git.sr.ht/~bryan_bennett/flake_env" + }, + "original": { + "type": "git", + "url": "https://git.sr.ht/~bryan_bennett/flake_env" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -193,7 +236,7 @@ "inputs": { "crane": "crane", "flake-compat": "flake-compat", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "flake-utils": [ "flake-utils" ], @@ -217,6 +260,21 @@ "type": "github" } }, + "nix-filter": { + "locked": { + "lastModified": 1701697642, + "narHash": "sha256-L217WytWZHSY8GW9Gx1A64OnNctbuDbfslaTEofXXRw=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "c843418ecfd0344ecb85844b082ff5675e02c443", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "nix-filter", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1704194953, @@ -348,6 +406,7 @@ "root": { "inputs": { "flake-utils": "flake-utils", + "flake_env": "flake_env", "home-manager": "home-manager", "impermanence": "impermanence", "lanzaboote": "lanzaboote", diff --git a/flake.nix b/flake.nix index 11ba808..b8852f7 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,13 @@ nixpkgs.follows = "nixpkgs"; }; }; + + flake_env = { + url = "git+https://git.sr.ht/~bryan_bennett/flake_env"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; }; outputs = @@ -44,6 +51,7 @@ , impermanence , lanzaboote , nixvim + , flake_env , } @ inputs: let diff --git a/home/programs/direnv.nix b/home/programs/direnv.nix index 37f6d99..37e30fd 100644 --- a/home/programs/direnv.nix +++ b/home/programs/direnv.nix @@ -1,6 +1,9 @@ -_: { +{ pkgs, flake_env, ... }: { programs.direnv = { enable = true; nix-direnv.enable = true; + stdlib = '' + source ${flake_env.packages.${pkgs.system}.flake_env}/share/flake_env/direnvrc + ''; }; }