conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
39 lines
966 B
Nix
39 lines
966 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.services.spice-webdavd;
|
|
in
|
|
{
|
|
options = {
|
|
services.spice-webdavd = {
|
|
enable = mkEnableOption (lib.mdDoc "the spice guest webdav proxy daemon");
|
|
|
|
package = mkOption {
|
|
default = pkgs.phodav;
|
|
defaultText = literalExpression "pkgs.phodav";
|
|
type = types.package;
|
|
description = lib.mdDoc "spice-webdavd provider package to use.";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
# ensure the webdav fs this exposes can actually be mounted
|
|
services.davfs2.enable = true;
|
|
|
|
# add the udev rule which starts the proxy when the spice socket is present
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
systemd.services.spice-webdavd = {
|
|
description = "spice-webdav proxy daemon";
|
|
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = "${cfg.package}/bin/spice-webdavd -p 9843";
|
|
Restart = "on-success";
|
|
};
|
|
};
|
|
};
|
|
}
|