Merge pull request #19722 from ericsagnes/feat/nspawn-optionSet
nspawn module: optionSet -> submodule
This commit is contained in:
commit
42093f3592
@ -41,41 +41,43 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
instanceOptions = {
|
instanceOptions = {
|
||||||
|
options = {
|
||||||
|
|
||||||
execConfig = mkOption {
|
execConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Parameters = "/bin/sh"; };
|
example = { Parameters = "/bin/sh"; };
|
||||||
type = types.addCheck (types.attrsOf unitOption) checkExec;
|
type = types.addCheck (types.attrsOf unitOption) checkExec;
|
||||||
description = ''
|
description = ''
|
||||||
Each attribute in this set specifies an option in the
|
Each attribute in this set specifies an option in the
|
||||||
<literal>[Exec]</literal> section of this unit. See
|
<literal>[Exec]</literal> section of this unit. See
|
||||||
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry> for details.
|
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
filesConfig = mkOption {
|
filesConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Bind = [ "/home/alice" ]; };
|
example = { Bind = [ "/home/alice" ]; };
|
||||||
type = types.addCheck (types.attrsOf unitOption) checkFiles;
|
type = types.addCheck (types.attrsOf unitOption) checkFiles;
|
||||||
description = ''
|
description = ''
|
||||||
Each attribute in this set specifies an option in the
|
Each attribute in this set specifies an option in the
|
||||||
<literal>[Files]</literal> section of this unit. See
|
<literal>[Files]</literal> section of this unit. See
|
||||||
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry> for details.
|
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
networkConfig = mkOption {
|
networkConfig = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
example = { Private = false; };
|
example = { Private = false; };
|
||||||
type = types.addCheck (types.attrsOf unitOption) checkNetwork;
|
type = types.addCheck (types.attrsOf unitOption) checkNetwork;
|
||||||
description = ''
|
description = ''
|
||||||
Each attribute in this set specifies an option in the
|
Each attribute in this set specifies an option in the
|
||||||
<literal>[Network]</literal> section of this unit. See
|
<literal>[Network]</literal> section of this unit. See
|
||||||
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
<citerefentry><refentrytitle>systemd.nspawn</refentrytitle>
|
||||||
<manvolnum>5</manvolnum></citerefentry> for details.
|
<manvolnum>5</manvolnum></citerefentry> for details.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -99,8 +101,7 @@ in {
|
|||||||
|
|
||||||
systemd.nspawn = mkOption {
|
systemd.nspawn = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrsOf types.optionSet;
|
type = with types; attrsOf (submodule instanceOptions);
|
||||||
options = [ instanceOptions ];
|
|
||||||
description = "Definition of systemd-nspawn configurations.";
|
description = "Definition of systemd-nspawn configurations.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user