1 { config, pkgs, lib, ... }:
5 cfg = config.services.spice-webdavd;
9 services.spice-webdavd = {
10 enable = mkEnableOption "the spice guest webdav proxy daemon";
12 package = mkPackageOption pkgs "phodav" { };
16 config = mkIf cfg.enable {
17 # ensure the webdav fs this exposes can actually be mounted
18 services.davfs2.enable = true;
20 # add the udev rule which starts the proxy when the spice socket is present
21 services.udev.packages = [ cfg.package ];
23 systemd.services.spice-webdavd = {
24 description = "spice-webdav proxy daemon";
28 ExecStart = "${cfg.package}/bin/spice-webdavd -p 9843";
29 Restart = "on-success";