lxc: set NIX_PATH
This commit is contained in:
parent
d94e9775c6
commit
3b5e493ce9
|
@ -5,6 +5,7 @@ let
|
|||
profilesDir = "/nix/var/nix/profiles/lxc";
|
||||
gcRoots = "/nix/var/nix/gcroots/lxc";
|
||||
containers = config.lxc.containers;
|
||||
nixPath = config.nix.nixPath;
|
||||
in {
|
||||
options = with types; {
|
||||
lxc.containers = mkOption {
|
||||
|
@ -31,6 +32,9 @@ in {
|
|||
|
||||
serviceConfig.Type = "oneshot";
|
||||
serviceConfig.RemainAfterExit = true;
|
||||
serviceConfig.Environment = [
|
||||
''NIX_PATH=${builtins.concatStringsSep ":" nixPath}''
|
||||
];
|
||||
|
||||
script = ''
|
||||
mkdir -p ${profilesDir}/${name}
|
||||
|
|
Loading…
Reference in New Issue