mirror of
https://github.com/NiklasGollenstede/nixos-installer.git
synced 2025-08-08 23:21:28 +02:00
add VPS-worker factory, add vm-exec module, improve run-qemu function, add push-flake script, support installing systems as non-root, script refactoring
This commit is contained in:
@ -1,12 +1,7 @@
|
||||
dirname: inputs: let
|
||||
|
||||
getNamedScriptFiles = dir: builtins.removeAttrs (builtins.listToAttrs (map (name: let
|
||||
match = builtins.match ''^(.*)[.]sh([.]md)?$'' name;
|
||||
in if (match != null) then {
|
||||
name = builtins.head match; value = "${dir}/${name}";
|
||||
} else { name = ""; value = null; }) (builtins.attrNames (builtins.readDir dir)))) [ "" ];
|
||||
|
||||
inherit (inputs.config) prefix;
|
||||
inherit (import "${dirname}/../imports.nix" dirname inputs) getFilesExt;
|
||||
|
||||
replacePrefix = if prefix == "wip" then (x: x) else (builtins.mapAttrs (name: path: (
|
||||
builtins.toFile name (builtins.replaceStrings
|
||||
@ -16,4 +11,4 @@ dirname: inputs: let
|
||||
)
|
||||
)));
|
||||
|
||||
in replacePrefix (getNamedScriptFiles dirname)
|
||||
in replacePrefix (getFilesExt "sh(.md)?" dirname)
|
||||
|
Reference in New Issue
Block a user