feat(genie): add init service
This commit is contained in:
parent
7d0760520c
commit
7e1e46daeb
|
@ -2,8 +2,20 @@
|
|||
|
||||
let
|
||||
dataDir = "/var/lib/genie-server";
|
||||
pulseRunDir = "/run/pulse";
|
||||
port = 3232;
|
||||
ociBackend = config.virtualisation.oci-containers.backend;
|
||||
in {
|
||||
systemd.services.genie-init = {
|
||||
enable = true;
|
||||
description = "Set up paths for genie";
|
||||
before = [ "${ociBackend}-genie.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
script = ''
|
||||
mkdir -p ${dataDir} ${pulseRunDir}
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers = {
|
||||
genie = {
|
||||
image = "stanfordoval/almond-server";
|
||||
|
@ -11,7 +23,7 @@ in {
|
|||
environment.PULSE_SERVER = "unix:/run/pulse/native";
|
||||
volumes = [
|
||||
"/dev/shm:/dev/shm"
|
||||
"/run/pulse:/run/pulse"
|
||||
"${pulseRunDir}:/run/pulse"
|
||||
"${dataDir}:/var/lib/genie-server"
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue