Hi, I try to build a container for gitit, searx and hound (each service one) to play around. I fail to override the memory limit and the cpu shares. Here is my service configuration for hound, as an example:
{ port, MemoryHighMB, CPUShares, ... }:
{
autoStart = false;
config = { config, pkgs, ... }: rec {
nixpkgs.config.allowUnfree = false;
services.hound = {
enable = true;
home = "/var/lib/hound";
config = ''
{
"max-concurrent-indexers" : 2,
"dbpath" : "${services.hound.home}/data",
"repos" : {
"nixpkgs": { "url" : "https://www.github.com/NixOS/nixpkgs.git"
},
"imag": { "url" :
"https://www.github.com/matthiasbeyer/imag.git" }
}
}
'';
listen = ":${toString port}";
serviceConfig = {
MemoryHigh = MemoryHighMB * 1024 * 1024;
CPUShares = CPUShares;
};
};
};
}
I import it like so into my system configuration:
containers = {
hound = import ./containers/hound.nix {
port = 8082;
MemoryHighMB = 512;
CPUShares = 512;
};
};
And it fails with:
error: The option `containers.gitit.services.gitit.serviceConfig' defined in
`<unknown-file>' does not exist.
Can someone tell what's wrong here?
--
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer
Consider switching to free software.
It adds value to your life.
https://www.gnu.org/
signature.asc
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
