nix-da/options/nysh.nix
Nydragon 90f053e027
chore: various fixes
- clean brontes config file
- fix context menus for nysh
- add adguard id for persistent client
2024-10-05 02:21:56 +02:00

39 lines
789 B
Nix

{
lib,
inputs',
config,
...
}:
let
inherit (lib) mkEnableOption mkOption mkIf;
inherit (lib.types) package;
cfg = config.modules.services.nysh;
in
{
options.modules.services.nysh = {
enable = mkEnableOption "nysh";
package = mkOption {
type = package;
default = inputs'.nysh.packages.nysh;
};
};
config = mkIf cfg.enable {
systemd.user.services.nysh = {
wantedBy = [
"multi-user.target"
"graphical-session.target"
];
unitConfig = {
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
serviceConfig = {
Type = "simple";
ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh";
Restart = "on-failure";
};
};
};
}