mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 16:39:07 +01:00
25 lines
531 B
Nix
25 lines
531 B
Nix
{ self, ... }:
|
|
{
|
|
perSystem =
|
|
{
|
|
self',
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
packages =
|
|
"${self}/scripts"
|
|
|> lib.filesystem.listFilesRecursive
|
|
|> lib.map (file: {
|
|
name =
|
|
file
|
|
|> lib.unsafeDiscardStringContext
|
|
|> lib.removePrefix "${self}/scripts/"
|
|
|> lib.removeSuffix ".nix"
|
|
|> lib.replaceString "/" "-";
|
|
value = import file { inherit self' pkgs lib; };
|
|
})
|
|
|> lib.listToAttrs;
|
|
};
|
|
}
|