mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 14:19:08 +01:00
scripts: Move nebula scripts into subdirectory
This commit is contained in:
parent
b94ff46b24
commit
0f69eb0355
3 changed files with 11 additions and 4 deletions
|
|
@ -10,9 +10,16 @@
|
|||
{
|
||||
packages =
|
||||
"${self}/scripts"
|
||||
|> builtins.readDir
|
||||
|> lib.attrNames
|
||||
|> lib.map (name: name |> lib.removeSuffix ".nix")
|
||||
|> self.lib.genAttrs (name: import "${self}/scripts/${name}.nix" { inherit self' pkgs lib; });
|
||||
|> 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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue