1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-16 16:19:44 +01:00
home-manager/modules/services/xembed-sni-proxy.nix

50 lines
1 KiB
Nix
Raw Normal View History

2019-01-26 14:18:07 +01:00
{ 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 = "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";
};
};
};
}