diff options
author | lassulus <lassulus@lassul.us> | 2023-01-19 14:12:03 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2023-01-19 14:12:03 +0100 |
commit | c89f76a0bd4f5060ead3d942387c37aff1350ec8 (patch) | |
tree | 6715b9053f54a97a5b72a4dd8a06a865326b5a91 /makefu/2configs/bureautomation/rhasspy.nix | |
parent | b51998cfae7b6fe892f9f0f9a2c0ffcfeeded0ba (diff) | |
parent | cb7ebd1c9120eb03ded2334db4c41fe6a0e26b88 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/bureautomation/rhasspy.nix')
-rw-r--r-- | makefu/2configs/bureautomation/rhasspy.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/makefu/2configs/bureautomation/rhasspy.nix b/makefu/2configs/bureautomation/rhasspy.nix new file mode 100644 index 000000000..8fbfd9312 --- /dev/null +++ b/makefu/2configs/bureautomation/rhasspy.nix @@ -0,0 +1,41 @@ +{ config, ... }: +let + profiles = "/var/lib/rhasspy"; + kiosk_id = toString config.users.users.kiosk.uid; +in +{ + virtualisation.oci-containers.containers.rhasspy = { + image = "rhasspy/rhasspy:latest"; + + environment = { + TZ = "Europe/Berlin"; + #PULSE_SERVER = "unix:/run/user/0/pulse/native"; + PULSE_SERVER = "tcp:${ config.krebs.build.host.name }:4713"; + + }; + + ports = [ + "12101:12101" + # "12183:12183" + ]; + #user = kiosk_id; + + volumes = [ + "/etc/localtime:/etc/localtime:ro" + "${profiles}:/profiles" + # TODO pulseaudio + #"/run/user/${kiosk_id}/pulse/native:/run/user/0/pulse/native" + #"${config.users.users.kiosk.home}/.config/pulse/cookie:/root/.config/pulse/cookie:ro" + ]; + + cmd = [ "--user-profiles" "/profiles" "--profile" "de" ]; + extraOptions = [ + "--device=/dev/snd:/dev/snd" "--group-add=audio" + "--net=host" + ]; + }; + systemd.tmpfiles.rules = [ + "d ${profiles} 0770 root root - -" + ]; + systemd.services.docker-rhasspy.after = [ "desktop-manager.service" ]; +} |