File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1313 default = config . _module . args . name ;
1414 description = "Name of the dataset" ;
1515 } ;
16+ _name = lib . mkOption {
17+ type = lib . types . str ;
18+ default = "${ config . _parent . name } /${ config . name } " ;
19+ internal = true ;
20+ description = "Fully quantified name for dataset" ;
21+ } ;
1622 type = lib . mkOption {
1723 type = lib . types . enum [ "zfs_volume" ] ;
1824 default = "zfs_volume" ;
6167 _create = diskoLib . mkCreateOption {
6268 inherit config options ;
6369 default = ''
64- if ! zfs get type "${ config . _parent . name } / ${ config . name } " >/dev/null 2>&1; then
65- zfs create "${ config . _parent . name } / ${ config . name } " \
70+ if ! zfs get type "${ config . _name } " >/dev/null 2>&1; then
71+ zfs create "${ config . _name } " \
6672 ${ lib . concatStringsSep " " ( lib . mapAttrsToList ( n : v : "-o ${ n } =${ v } " ) config . options ) } \
6773 -V ${ config . size } ${ toString ( builtins . map lib . escapeShellArg config . extraArgs ) }
6874 zvol_wait
You can’t perform that action at this time.
0 commit comments