1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-03 07:31:03 +01:00
home-manager/modules/services/opensnitch-ui.nix
Austin Horstman 82ee14ff60
treewide: remove with lib (#6871)
Remove from services.
2025-04-21 11:00:59 -05:00

44 lines
857 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.opensnitch-ui;
in
{
meta.maintainers = [ lib.maintainers.onny ];
options = {
services.opensnitch-ui = {
enable = lib.mkEnableOption "Opensnitch client";
};
};
config = lib.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.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Environment = [ "PATH=${config.home.profileDirectory}/bin" ];
ExecStart = "${pkgs.opensnitch-ui}/bin/opensnitch-ui";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}