diff options
Diffstat (limited to 'home-manager/modules/services/xembed-sni-proxy.nix')
-rw-r--r-- | home-manager/modules/services/xembed-sni-proxy.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/home-manager/modules/services/xembed-sni-proxy.nix b/home-manager/modules/services/xembed-sni-proxy.nix new file mode 100644 index 00000000000..d9e5ae783f9 --- /dev/null +++ b/home-manager/modules/services/xembed-sni-proxy.nix @@ -0,0 +1,49 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.xembed-sni-proxy; + +in + +{ + meta.maintainers = [ maintainers.rycee ]; + + options = { + services.xembed-sni-proxy = { + enable = mkEnableOption "XEmbed SNI Proxy"; + + package = mkOption { + type = types.package; + default = pkgs.plasma-workspace; + defaultText = literalExample "pkgs.plasma-workspace"; + description = '' + Package containing the <command>xembedsniproxy</command> + program. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + systemd.user.services.xembed-sni-proxy = { + Unit = { + Description = "XEmbed SNI Proxy"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + + Service = { + Environment = "PATH=${config.home.profileDirectory}/bin"; + ExecStart = "${cfg.package}/bin/xembedsniproxy"; + Restart = "on-abort"; + }; + }; + }; +} |