add flake_env to direnv

This commit is contained in:
Adithya 2024-01-04 21:51:29 +05:30
parent f863db00cc
commit ff91252459
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 57 additions and 3 deletions

View file

@ -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,27 @@
"type": "github"
}
},
"flake_env": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1703882084,
"narHash": "sha256-FGT+CR1WYPzFcuPIh3h4iCaPj0YgFERMAuRwMsbk8Lg=",
"ref": "refs/heads/main",
"rev": "6ec3bd2378bec61b383c2198ceb2b73515e6cde6",
"revCount": 9,
"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 +235,7 @@
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"flake-utils": [
"flake-utils"
],
@ -363,6 +405,7 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
"flake_env": "flake_env",
"home-manager": "home-manager",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",

View file

@ -38,6 +38,13 @@
nixpkgs.follows = "nixpkgs";
};
};
flake_env = {
url = "git+https://git.sr.ht/~bryan_bennett/flake_env";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
};
outputs =
@ -49,6 +56,7 @@
, lanzaboote
, nixos-hardware
, nixvim
, flake_env
,
} @ inputs:
let
@ -83,7 +91,7 @@
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = { inherit secrets; };
extraSpecialArgs = inputs // { inherit secrets; };
users.${secrets.users.primary.userName} = { pkgs, ... }: {
imports = [
impermanence.nixosModules.home-manager.impermanence

View file

@ -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
'';
};
}