diff --git a/lib/modules/fileSystems.nix b/lib/modules/fileSystems.nix index ee892cae..41304a49 100644 --- a/lib/modules/fileSystems.nix +++ b/lib/modules/fileSystems.nix @@ -4,7 +4,7 @@ let cfg = config.valhalla.fileSystems; in { imports = [ - ./partition/disks.nix + ./fileSystems/disks.nix ]; options = { @@ -33,7 +33,7 @@ in { + (lib.strings.concatStringsSep ", " (builtins.map (_: "${_.deviceVariable}") (lib.lists.init devices))) + (if (builtins.length devices) > 1 then " and " else "") + (lib.lists.last devices).deviceVariable + ''"'') '' - if ! fish ${./partition/confirm.fish} "Are you sure you want to continue?" "n"; then + if ! fish ${./fileSystems/confirm.fish} "Are you sure you want to continue?" "n"; then exit 1 fi '' diff --git a/lib/modules/partition/choose-device.fish b/lib/modules/fileSystems/choose-device.fish similarity index 100% rename from lib/modules/partition/choose-device.fish rename to lib/modules/fileSystems/choose-device.fish diff --git a/lib/modules/partition/confirm.fish b/lib/modules/fileSystems/confirm.fish similarity index 100% rename from lib/modules/partition/confirm.fish rename to lib/modules/fileSystems/confirm.fish diff --git a/lib/modules/partition/disks.nix b/lib/modules/fileSystems/disks.nix similarity index 100% rename from lib/modules/partition/disks.nix rename to lib/modules/fileSystems/disks.nix diff --git a/lib/modules/partition/fs.nix b/lib/modules/fileSystems/fs.nix similarity index 100% rename from lib/modules/partition/fs.nix rename to lib/modules/fileSystems/fs.nix diff --git a/lib/modules/partition/select.fish b/lib/modules/fileSystems/select.fish similarity index 100% rename from lib/modules/partition/select.fish rename to lib/modules/fileSystems/select.fish diff --git a/lib/modules/partition.nix b/lib/modules/partition.nix index 8cc29c6d..b9ff401d 100644 --- a/lib/modules/partition.nix +++ b/lib/modules/partition.nix @@ -1,5 +1,5 @@ { ... }: { imports = [ - ./partition/disks.nix + ./fileSystems/disks.nix ]; } diff --git a/profiles/machines/manuel/Generic/config.nix b/profiles/machines/manuel/Generic/config.nix index a2e22c44..fbbe1e83 100644 --- a/profiles/machines/manuel/Generic/config.nix +++ b/profiles/machines/manuel/Generic/config.nix @@ -1,5 +1,5 @@ { lib, config, ... }: -let fs = import ../../../../lib/modules/partition/fs.nix; +let fs = import ../../../../lib/modules/fileSystems/fs.nix; in { imports = [ ../defaults.nix ]; diff --git a/profiles/machines/manuel/server.nix b/profiles/machines/manuel/server.nix index a18d755c..46a26ba4 100644 --- a/profiles/machines/manuel/server.nix +++ b/profiles/machines/manuel/server.nix @@ -1,5 +1,5 @@ { lib, config, ... }: -let fs = import ../../../lib/modules/partition/fs.nix; +let fs = import ../../../lib/modules/fileSystems/fs.nix; in { imports = [ ../../users/manuel/config.nix ]; diff --git a/scripts/lib/restoration.fish b/scripts/lib/restoration.fish index 3e40056e..07e01032 100644 --- a/scripts/lib/restoration.fish +++ b/scripts/lib/restoration.fish @@ -7,7 +7,7 @@ function initBackupConfig -V dir -d "Fetches the configuration by prompting the if [ -z "$VALHALLA_BACKUP_DIR" ] argparse -i "action=" -- $argv set -l index - set -l confirm fish "$dir/../../lib/modules/partition/confirm.fish" + set -l confirm fish "$dir/../../lib/modules/fileSystems/confirm.fish" switch "$_flag_action" case backup diff --git a/scripts/lib/settings.fish b/scripts/lib/settings.fish index 63ae256a..1588ad67 100755 --- a/scripts/lib/settings.fish +++ b/scripts/lib/settings.fish @@ -4,7 +4,7 @@ function isConfigured -S end function selectProfile -S -a result - source "$(status dirname)/../../lib/modules/partition/select.fish" + source "$(status dirname)/../../lib/modules/fileSystems/select.fish" set -l file (mktemp) set -l header NAME set -l profiles diff --git a/winiso/lib/choose-disk.fish b/winiso/lib/choose-disk.fish index eec18e62..d01dbe5e 100755 --- a/winiso/lib/choose-disk.fish +++ b/winiso/lib/choose-disk.fish @@ -1,6 +1,6 @@ #!/bin/env fish function chooseDisk -a result message set -l file (mktemp) - fish "$(status dirname)/../../lib/modules/partition/choose-disk.fish" "$file" "$message" + fish "$(status dirname)/../../lib/modules/fileSystems/choose-disk.fish" "$file" "$message" set -g "$result" (cat "$file") end diff --git a/winiso/lib/confirm.fish b/winiso/lib/confirm.fish index f83f5de4..11579ce7 100755 --- a/winiso/lib/confirm.fish +++ b/winiso/lib/confirm.fish @@ -1,4 +1,4 @@ #!/bin/env fish function confirm -a message default - fish "$(status dirname)/../../lib/modules/partition/confirm.fish" $argv + fish "$(status dirname)/../../lib/modules/fileSystems/confirm.fish" $argv end