mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
Extract shell scripts into a scripts directory
This commit is contained in:
parent
6e8cea6a1f
commit
2cb6bb6a3c
5 changed files with 105 additions and 95 deletions
13
flake-parts/scripts.nix
Normal file
13
flake-parts/scripts.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ self, ... }:
|
||||
{
|
||||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
packages =
|
||||
"${self}/scripts"
|
||||
|> builtins.readDir
|
||||
|> lib.attrNames
|
||||
|> lib.map (name: name |> lib.removeSuffix ".nix")
|
||||
|> self.lib.genAttrs (name: import "${self}/scripts/${name}.nix" { inherit pkgs; });
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue