feat: custom nix store
This commit is contained in:
parent
57d5370e76
commit
59f97876e3
3 changed files with 8 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
|||
- docker-compose.services
|
||||
|
||||
*/
|
||||
{ pkgs, uid, lib, config, ... }:
|
||||
{ pkgs, uid, lib, config, customNixRootPath, ... }:
|
||||
|
||||
let
|
||||
evalService = name: modules:
|
||||
|
@ -30,6 +30,7 @@ let
|
|||
key = ./docker-compose-module.nix;
|
||||
config._module.args.pkgs = lib.mkForce pkgs;
|
||||
config._module.args.uid = uid;
|
||||
config._module.args.customNixRootPath = customNixRootPath;
|
||||
};
|
||||
|
||||
in
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ modules ? [], uid ? 0, pkgs }:
|
||||
{ modules ? [], uid ? 0, pkgs, customNixRootPath ? "", }:
|
||||
|
||||
let _pkgs = pkgs;
|
||||
in
|
||||
|
@ -26,6 +26,7 @@ let
|
|||
key = ./eval-composition.nix;
|
||||
config._module.args.pkgs = lib.mkIf (pkgs != null) (lib.mkForce pkgs);
|
||||
config._module.args.uid = uid;
|
||||
config._module.args.customNixRootPath = customNixRootPath;
|
||||
};
|
||||
|
||||
in
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
when the service.useHostStore option is set to true.
|
||||
|
||||
*/
|
||||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, pkgs, customNixRootPath, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkOption types mkIf;
|
||||
in
|
||||
|
@ -20,8 +21,8 @@ in
|
|||
service.image = "arion-base";
|
||||
service.build.context = "${../arion-image}";
|
||||
service.volumes = [
|
||||
"/nix/store:/nix/store"
|
||||
"${pkgs.buildEnv { name = "container-system-env"; paths = [ pkgs.bashInteractive pkgs.coreutils ]; }}:/run/system"
|
||||
"${customNixRootPath}/nix/store:/nix/store"
|
||||
"${customNixRootPath}${pkgs.buildEnv { name = "container-system-env"; paths = [ pkgs.bashInteractive pkgs.coreutils ]; }}:/run/system"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue