Skip to content

Commit

Permalink
Merge pull request #110 from roperscrossroads/feat/add-spiceproxy
Browse files Browse the repository at this point in the history
feat: add PVE spiceproxy
  • Loading branch information
JulienMalka authored Dec 29, 2024
2 parents 15187a4 + 3b6931c commit 4ad21ba
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion modules/proxmox-ve/manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,27 @@ lib.mkIf cfg.enable {
# };
# };

# spiceproxy = { };
spiceproxy = {
description = "PVE SPICE Proxy Server";
wantedBy = [ "multi-user.target" ];
after = [ "pveproxy.service" ];
wants = [ "pveproxy.service" ];
serviceConfig = {
ExecStartPre = [
"${pkgs.coreutils}/bin/touch /var/lock/spiceproxy.lck"
"${pkgs.coreutils}/bin/chown www-data:www-data /var/lock/spiceproxy.lck"
];
ExecStart = "${pkgs.proxmox-ve}/bin/spiceproxy start";
ExecStop = [
"${pkgs.coreutils}/bin/rm -f /var/lock/spiceproxy.lck"
"${pkgs.proxmox-ve}/bin/spiceproxy stop"
];
ExecReload = "${pkgs.proxmox-ve}/bin/spiceproxy restart";
PIDFile = "/run/pveproxy/spiceproxy.pid"; # the code puts it here, not in /run/spiceproxy/
Type = "forking";
Restart = "on-failure";
};
};
};

systemd.tmpfiles.rules = [ "d /var/log/pveproxy 0755 www-data www-data -" ];
Expand Down

0 comments on commit 4ad21ba

Please sign in to comment.