set NIX_REMOTE when using the daemon

This commit is contained in:
Domen Kožar 2019-05-07 17:10:41 +07:00
parent fbf57b4489
commit 207de9cef0
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -27,6 +27,7 @@ in
image.nixBuild = false; # no need to build and load image.nixBuild = false; # no need to build and load
service.image = "arion-base"; service.image = "arion-base";
service.build.context = "${../../../arion-image}"; service.build.context = "${../../../arion-image}";
service.environment.NIX_REMOTE = lib.optionalString config.service.useHostNixDaemon "daemon";
service.volumes = [ service.volumes = [
"${config.host.nixStorePrefix}/nix/store:/nix/store" "${config.host.nixStorePrefix}/nix/store:/nix/store"
"${config.host.nixStorePrefix}${pkgs.buildEnv { name = "container-system-env"; paths = [ pkgs.bashInteractive pkgs.coreutils ]; }}:/run/system" "${config.host.nixStorePrefix}${pkgs.buildEnv { name = "container-system-env"; paths = [ pkgs.bashInteractive pkgs.coreutils ]; }}:/run/system"