2019-01-26 14:18:07 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.xembed-sni-proxy;
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
in {
|
2019-01-26 14:18:07 +01:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
services.xembed-sni-proxy = {
|
|
|
|
enable = mkEnableOption "XEmbed SNI Proxy";
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.plasma-workspace;
|
2019-08-28 00:12:28 +02:00
|
|
|
defaultText = literalExample "pkgs.plasma-workspace";
|
2019-01-26 14:18:07 +01:00
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2019-01-26 14:18:07 +01:00
|
|
|
|
|
|
|
Service = {
|
|
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
|
|
ExecStart = "${cfg.package}/bin/xembedsniproxy";
|
|
|
|
Restart = "on-abort";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|