-
-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
Hello!
I'm trying to add a snapshot option to the zpool
datasets, but can't because of a conflicting option definition:
error: The option `disko.devices.zpool.behemoth.datasets' in `/nix/store/27fy4ihy16233z2ipadgivvq2zkl69nn-source/common' is already declared in `/nix/store/0gqwnbivnyh3maw495r22l6k6d8bl9hd-source/lib/types/zpool.nix'.
Here's the entire option config:
{
config,
lib,
...
}:
{
options.disko.devices.zpool =
with lib;
mkOption {
type =
with types;
attrsOf (
submodule (
{ name, config, ... }:
{
options.datasets = mkOption {
type = attrsOf (
submodule (
{
name,
config,
options,
diskoLib,
...
}:
{
options = {
snapshot = mkOption {
type = types.nullOr types.str;
default = null;
description = "The blank snapshot";
};
_create = diskoLib.mkCreateOption {
inherit config options;
default = ''
${options._create.default}
${optionalString (config.snapshot != null) ''
zfs snapshot ${config._name}@${config.snapshot}
zfs hold blank ${config._name}@${config.snapshot}
''}
'';
};
};
}
)
);
};
}
)
);
};
}
I was under the assumption that the options would be merged automatically.
Any help would be greatly appreciated!
Metadata
Metadata
Assignees
Labels
No labels