1 { config, pkgs, lib, ... }:
5 cfg = config.services.spice-webdavd;
9 services.spice-webdavd = {
10 enable = mkEnableOption (lib.mdDoc "the spice guest webdav proxy daemon");
13 default = pkgs.phodav;
14 defaultText = literalExpression "pkgs.phodav";
16 description = lib.mdDoc "spice-webdavd provider package to use.";
21 config = mkIf cfg.enable {
22 # ensure the webdav fs this exposes can actually be mounted
23 services.davfs2.enable = true;
25 # add the udev rule which starts the proxy when the spice socket is present
26 services.udev.packages = [ cfg.package ];
28 systemd.services.spice-webdavd = {
29 description = "spice-webdav proxy daemon";
33 ExecStart = "${cfg.package}/bin/spice-webdavd -p 9843";
34 Restart = "on-success";