diff options
author | Artturi <Artturin@artturin.com> | 2023-10-22 18:52:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 18:52:10 +0300 |
commit | b2426befa0083bbb1b835edba2165cb2c39ce8ce (patch) | |
tree | c780c0775c97f6780fdbaf8b906207797bc03c53 /nixos/modules/services | |
parent | 187c660416b90709025402ef924d334dab140471 (diff) | |
parent | d147d7feed63ba43e80a103d278d5ad4bb12b1fd (diff) | |
download | nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar.gz nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar.bz2 nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar.lz nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar.xz nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.tar.zst nixlib-b2426befa0083bbb1b835edba2165cb2c39ce8ce.zip |
Merge pull request #259784 from dmytrokyrychuk/init-spice-autorandr
spice-autorandr: init at 0.0.2
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/misc/spice-autorandr.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/spice-autorandr.nix b/nixos/modules/services/misc/spice-autorandr.nix new file mode 100644 index 000000000000..8437441c752a --- /dev/null +++ b/nixos/modules/services/misc/spice-autorandr.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: + +let + cfg = config.services.spice-autorandr; +in +{ + options = { + services.spice-autorandr = { + enable = lib.mkEnableOption (lib.mdDoc "spice-autorandr service that will automatically resize display to match SPICE client window size."); + package = lib.mkPackageOptionMD pkgs "spice-autorandr" { }; + }; + }; + + 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"; + }; + }; + }; +} |