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