forked from mirrors/nixpkgs
lxd: When lxcfs
is enabled, start lxd
with explicit LXD_LXC_TEMPLATE_CONFIG
This commit is contained in:
parent
4dee97c43e
commit
6c6924b2eb
|
@ -24,6 +24,12 @@ in
|
|||
containers. Users in the "lxd" group can interact with
|
||||
the daemon (e.g. to start or stop containers) using the
|
||||
<command>lxc</command> command line tool, among others.
|
||||
|
||||
Most of the time, you'll also want to start lxcfs, so
|
||||
that containers can "see" the limits:
|
||||
<code>
|
||||
virtualisation.lxc.lxcfs.enable = true;
|
||||
</code>
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -114,6 +120,12 @@ in
|
|||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "infinity";
|
||||
TasksMax = "infinity";
|
||||
|
||||
# By default, `lxd` loads configuration files from hard-coded
|
||||
# `/usr/share/lxc/config` - since this is a no-go for us, we have to
|
||||
# explicitly tell it where the actual configuration files are
|
||||
Environment = mkIf (config.virtualisation.lxc.lxcfs.enable)
|
||||
"LXD_LXC_TEMPLATE_CONFIG=${pkgs.lxcfs}/share/lxc/config";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue