fix: fixed generation of disko configuration
This commit is contained in:
parent
730eeef242
commit
3ca0e9bf0a
5 changed files with 229 additions and 42 deletions
|
|
@ -44,12 +44,12 @@
|
|||
|
||||
mount = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.either lib.types.bool (lib.types.enum ["on" "off" "noauto"]));
|
||||
default = null;
|
||||
type = lib.types.either lib.types.bool (lib.types.enum ["on" "off" "noauto"]);
|
||||
default = true;
|
||||
description = "Whether and how the dataset should be mounted";
|
||||
};
|
||||
mountPoint = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
type = lib.types.str;
|
||||
description = "Controls the mount point used for this file system";
|
||||
};
|
||||
};
|
||||
|
|
@ -57,18 +57,15 @@
|
|||
encryption = {
|
||||
enable = lib.mkEnableOption "should encryption be enabled";
|
||||
type = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.enum ["aes-128-ccm" "aes-192-ccm" "aes-256-ccm" "aes-128-gcm" "aes-192-gcm" "aes-256-gcm"]);
|
||||
default = null;
|
||||
type = lib.types.enum ["aes-128-ccm" "aes-192-ccm" "aes-256-ccm" "aes-128-gcm" "aes-192-gcm" "aes-256-gcm"];
|
||||
description = "What encryption type to use";
|
||||
};
|
||||
keyformat = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.enum ["raw" "hex" "passphrase"]);
|
||||
default = null;
|
||||
type = lib.types.enum ["raw" "hex" "passphrase"];
|
||||
description = "Format of the encryption key";
|
||||
};
|
||||
keylocation = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
type = lib.types.str;
|
||||
description = "Location of the encryption key";
|
||||
};
|
||||
};
|
||||
|
|
@ -77,14 +74,11 @@
|
|||
# This option should set this option flag
|
||||
# "com.sun:auto-snapshot" = "false";
|
||||
autoSnapshot = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable automatic snapshots for this dataset";
|
||||
};
|
||||
# TODO: this is what blank snapshot should set
|
||||
# postCreateHook = ''
|
||||
# zfs snapshot rpool/local/system/root@blank
|
||||
# '';
|
||||
# Creates a blank snapshot in the post create hook for rollback purposes
|
||||
blankSnapshot = lib.mkEnableOption "Should a blank snapshot be auto created in the post create hook";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ in {
|
|||
config = {
|
||||
mount = {
|
||||
mountPoint = lib.mkDefault "/${name}";
|
||||
enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue