grafana-alloy: don't build the frontend twice
[NixPkgs.git] / nixos / modules / services / misc / spice-autorandr.nix
blob92b8a15e93c5decffb4981ba7aa9556f5f0f2e38
1 { config, pkgs, lib, ... }:
3 let
4   cfg = config.services.spice-autorandr;
5 in
7   options = {
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" { };
11     };
12   };
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" ];
20       serviceConfig = {
21         ExecStart = "${cfg.package}/bin/spice-autorandr";
22         Restart = "on-failure";
23       };
24     };
25   };