1 { config, pkgs, lib, ... }:
4 cfg = config.services.spice-autorandr;
8 services.spice-autorandr = {
9 enable = lib.mkEnableOption "spice-autorandr service that will automatically resize display to match SPICE client window size";
10 package = lib.mkPackageOption pkgs "spice-autorandr" { };
14 config = lib.mkIf cfg.enable {
15 environment.systemPackages = [ cfg.package ];
17 systemd.user.services.spice-autorandr = {
18 wantedBy = [ "default.target" ];
19 after = [ "spice-vdagentd.service" ];
21 ExecStart = "${cfg.package}/bin/spice-autorandr";
22 Restart = "on-failure";