diff --git a/flake.lock b/flake.lock index af8cdf9..7b2b85e 100644 --- a/flake.lock +++ b/flake.lock @@ -64,11 +64,46 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1791966044, + "narHash": "sha256-t1hT8UW97rFCWCJO7/pClvu0AhLN5V3uir2M0ic4w/Q=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "319e4cebef10cbb636c6ea392137b52ad105336a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", "import-tree": "import-tree", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "wrappers": "wrappers" + } + }, + "wrappers": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1792532408, + "narHash": "sha256-rasFTcWJo7CdUaCFcxcDTnMWlY6WxZo/X6EsbEqgIpM=", + "owner": "nix-community", + "repo": "nix-wrapper-modules", + "rev": "e40208b34e08f764e6b972eb0ee919706e960eb2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-wrapper-modules", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 2bceac9..4cf26b3 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,9 @@ # Flake parts utils flake-parts.url = "github:hercules-ci/flake-parts"; import-tree.url = "github:vic/import-tree"; + + # Nix Wrapper Modules + wrappers.url = "github:nix-community/nix-wrapper-modules"; }; # Default import-tree output diff --git a/modules/features/example/bashrc b/modules/features/example/bashrc new file mode 100644 index 0000000..e7f4bc8 --- /dev/null +++ b/modules/features/example/bashrc @@ -0,0 +1,2 @@ +export SOME="some" +# other bash stuff diff --git a/modules/features/example/default.nix b/modules/features/example/default.nix new file mode 100644 index 0000000..697fb2d --- /dev/null +++ b/modules/features/example/default.nix @@ -0,0 +1,14 @@ +{inputs, ...}: { + perSystem = {pkgs, ...}: { + packages = { + example = pkgs.hello; + bash = inputs.wrappers.lib.wrapPackage { + inherit pkgs; + package = pkgs.bash; + flags = { + "--rcfile" = ./bashrc; + }; + }; + }; + }; +}