2019-01-26 13:18:07 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.xembed-sni-proxy;
|
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
in {
|
2019-01-26 13:18:07 +00:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
services.xembed-sni-proxy = {
|
2023-07-01 23:45:18 +00:00
|
|
|
enable = mkEnableOption "XEmbed SNI Proxy";
|
2019-01-26 13:18:07 +00:00
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.plasma-workspace;
|
2021-10-09 09:14:08 +00:00
|
|
|
defaultText = literalExpression "pkgs.plasma-workspace";
|
2023-07-01 23:45:18 +00:00
|
|
|
description = ''
|
2023-06-30 23:30:13 +00:00
|
|
|
Package containing the {command}`xembedsniproxy`
|
2019-01-26 13:18:07 +00:00
|
|
|
program.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-07 21:24:27 +00:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.xembed-sni-proxy" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2019-01-26 13:18:07 +00:00
|
|
|
systemd.user.services.xembed-sni-proxy = {
|
|
|
|
Unit = {
|
|
|
|
Description = "XEmbed SNI Proxy";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
2020-02-01 23:39:17 +00:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2019-01-26 13:18:07 +00:00
|
|
|
|
|
|
|
Service = {
|
|
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
|
|
ExecStart = "${cfg.package}/bin/xembedsniproxy";
|
|
|
|
Restart = "on-abort";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|