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 = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "XEmbed SNI Proxy";
|
2019-01-26 14:18:07 +01:00
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.plasma-workspace;
|
2021-10-09 11:14:08 +02:00
|
|
|
defaultText = literalExpression "pkgs.plasma-workspace";
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2023-07-01 01:30:13 +02:00
|
|
|
Package containing the {command}`xembedsniproxy`
|
2019-01-26 14:18:07 +01:00
|
|
|
program.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-07 23:24:27 +02:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.xembed-sni-proxy" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2019-01-26 14:18:07 +01:00
|
|
|
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 = {
|
2024-09-19 18:13:59 +02:00
|
|
|
Environment = [ "PATH=${config.home.profileDirectory}/bin" ];
|
2019-01-26 14:18:07 +01:00
|
|
|
ExecStart = "${cfg.package}/bin/xembedsniproxy";
|
|
|
|
Restart = "on-abort";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|