mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 15:09:46 +01:00
7540dcc789
See #5854
38 lines
837 B
Nix
38 lines
837 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.opensnitch-ui;
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.onny ];
|
|
|
|
options = {
|
|
services.opensnitch-ui = { enable = mkEnableOption "Opensnitch client"; };
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
assertions = [
|
|
(lib.hm.assertions.assertPlatform "services.opensnitch-ui" pkgs
|
|
lib.platforms.linux)
|
|
];
|
|
|
|
systemd.user.services.opensnitch-ui = {
|
|
Unit = {
|
|
Description = "Opensnitch ui";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Service = {
|
|
Environment = [ "PATH=${config.home.profileDirectory}/bin" ];
|
|
ExecStart = "${pkgs.opensnitch-ui}/bin/opensnitch-ui";
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
};
|
|
};
|
|
}
|