Compare commits

...
4 Commits
Author SHA1 Message Date
lassulus d4a2a6f8bb disko-install: add --disko-system-config parameter 2025-01-18 00:54:28 +01:00
Jörg Thalheim bf0abfde48 Merge pull request #941 from LogicalOverflow/master
fix eval of `zfs_volume`'s `_unmount` if `content` is `null`
2025-01-16 15:34:23 +01:00
Leonie Marcy Vack c53bfaa13a zfs_volume: fix eval of _unmount if content is null 2025-01-16 14:46:04 +01:00
Leonie Marcy Vack 1ae7c794d9 zfs_volume: add zfs_volume without content to zfs example 2025-01-16 14:45:30 +01:00
4 changed files with 18 additions and 1 deletions

No files matched your search

+9
View File
@@ -110,6 +110,15 @@ parseArgs() {
extraSystemConfig="$2" extraSystemConfig="$2"
shift shift
;; ;;
--disko-system-config)
if [[ $# -lt 2 ]]; then
echo "Option $1 requires one JSON argument." >&2
exit 1
fi
# shellcheck disable=SC2034
extraDiskoSystemConfig="$2"
shift
;;
--extra-files) --extra-files)
if [[ $# -lt 3 ]]; then if [[ $# -lt 3 ]]; then
echo "Option $1 requires two arguments: source, destination" >&2 echo "Option $1 requires two arguments: source, destination" >&2
+4
View File
@@ -81,6 +81,10 @@
mountpoint = "/ext4onzfs"; mountpoint = "/ext4onzfs";
}; };
}; };
zfs_volume_no_content = {
type = "zfs_volume";
size = "10M";
};
zfs_encryptedvolume = { zfs_encryptedvolume = {
type = "zfs_volume"; type = "zfs_volume";
size = "10M"; size = "10M";
+4
View File
@@ -2,6 +2,7 @@
, flakeAttr , flakeAttr
, diskMappings , diskMappings
, extraSystemConfig ? "{}" , extraSystemConfig ? "{}"
, extraDiskoSystemConfig ? "{}"
, writeEfiBootEntries ? false , writeEfiBootEntries ? false
, rootMountPoint ? "/mnt" , rootMountPoint ? "/mnt"
, ,
@@ -41,6 +42,9 @@ let
{ {
disko.rootMountPoint = rootMountPoint; disko.rootMountPoint = rootMountPoint;
disko.devices.disk = lib.mkVMOverride cleanedDisks; disko.devices.disk = lib.mkVMOverride cleanedDisks;
imports = [
({ _file = "disko-install --system-config"; } // (builtins.fromJSON extraDiskoSystemConfig))
];
} }
]; ];
}; };
+1 -1
View File
@@ -88,7 +88,7 @@
${config.content._unmount.dev or ""} ${config.content._unmount.dev or ""}
''; '';
fs = config.content._unmount.fs; fs = config.content._unmount.fs or {};
}; };
}; };
_config = lib.mkOption { _config = lib.mkOption {