nixpkgs/nixos/modules/services/misc/spice-autorandr.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
687 B
Nix
Raw Normal View History

2023-10-08 20:22:45 +00:00
{ config, pkgs, lib, ... }:
let
cfg = config.services.spice-autorandr;
in
{
options = {
services.spice-autorandr = {
2024-06-03 16:59:45 +00:00
enable = lib.mkEnableOption "spice-autorandr service that will automatically resize display to match SPICE client window size";
package = lib.mkPackageOption pkgs "spice-autorandr" { };
2023-10-08 20:22:45 +00:00
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.spice-autorandr = {
wantedBy = [ "default.target" ];
after = [ "spice-vdagentd.service" ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/spice-autorandr";
Restart = "on-failure";
};
};
};
}