Extract shell scripts into a scripts directory

This commit is contained in:
SebastianStork 2026-02-05 20:57:58 +01:00
parent 6e8cea6a1f
commit 2cb6bb6a3c
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q
5 changed files with 105 additions and 95 deletions

13
flake-parts/scripts.nix Normal file
View 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; });
};
}