From 985a40890084cba8c0587aa024664d9eb216ca49 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 22 Sep 2024 17:54:12 +0200 Subject: [PATCH] Move scripts for `nix` to a different location --- .../Common/Scripts => lib/modules/partition}/choose-disk.sh | 0 lib/modules/partition/disks.nix | 6 +++--- .../Common/Scripts => lib/modules/partition}/is-truthy.sh | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {scripts/Common/Scripts => lib/modules/partition}/choose-disk.sh (100%) rename {scripts/Common/Scripts => lib/modules/partition}/is-truthy.sh (100%) diff --git a/scripts/Common/Scripts/choose-disk.sh b/lib/modules/partition/choose-disk.sh similarity index 100% rename from scripts/Common/Scripts/choose-disk.sh rename to lib/modules/partition/choose-disk.sh diff --git a/lib/modules/partition/disks.nix b/lib/modules/partition/disks.nix index e677b46c..e7ddb4f2 100644 --- a/lib/modules/partition/disks.nix +++ b/lib/modules/partition/disks.nix @@ -78,7 +78,7 @@ diskVar = ''''${${diskVarName}}''; diskSelector = '' - . ${./../../../scripts/Common/Scripts/choose-disk.sh}; + . ${./choose-disk.sh}; chooseDisk ${diskVarName} "Which disk do you wish to install the OS on?"; ''; @@ -176,7 +176,7 @@ else '' ${diskVarName}=${config.devicePath} ${if osDisk then '' - . ${./../../../scripts/Common/Scripts/is-truthy.sh} + . ${./is-truthy.sh} if [ ! -b ${diskVar} ]; then function fallback() { echo "Couldn't find the specified disk \"${diskVar}\"." @@ -357,7 +357,7 @@ ] ++ (builtins.map (_: _.deviceScript) disks) ++ lib.optionals ((builtins.length disks) > 0) [ - ". ${./../../../scripts/Common/Scripts/is-truthy.sh}" + ". ${./is-truthy.sh}" ''echo "$(tput setaf 3)==== WARNING ====$(tput sgr0)"'' (''echo "Continuing this script will alter the partitions of '' + ( lib.strings.concatStringsSep ", " (builtins.map (_: "${_.deviceVariable}") (lib.lists.init disks)) diff --git a/scripts/Common/Scripts/is-truthy.sh b/lib/modules/partition/is-truthy.sh similarity index 100% rename from scripts/Common/Scripts/is-truthy.sh rename to lib/modules/partition/is-truthy.sh