nixos/elephant: init service
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
|
||||
- [dsearch](https://github.com/AvengeMedia/danksearch), a fast filesystem search service with fuzzy matching. Available as [programs.dsearch](#opt-programs.dsearch.enable).
|
||||
|
||||
- [Elephant](https://github.com/abenz1267/elephant), a data provider service and backend for building custom application launchers. Available as [services.elephant](#opt-services.elephant.enable).
|
||||
|
||||
- [Dunst](https://github.com/dunst-project/dunst), a lightweight and customizable notification daemon. Available as [services.dunst](#opt-services.dunst.enable).
|
||||
|
||||
- [Ente Auth](https://ente.io/auth/), an open source 2FA authenticator, with end-to-end encrypted backups. Available as [programs.ente-auth](#opt-programs.ente-auth.enable).
|
||||
|
||||
@@ -843,6 +843,7 @@
|
||||
./services/misc/dump1090-fa.nix
|
||||
./services/misc/dwm-status.nix
|
||||
./services/misc/dysnomia.nix
|
||||
./services/misc/elephant.nix
|
||||
./services/misc/errbot.nix
|
||||
./services/misc/ersatztv.nix
|
||||
./services/misc/etebase-server.nix
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.elephant;
|
||||
in
|
||||
{
|
||||
options.services.elephant = {
|
||||
enable = lib.mkEnableOption "Elephant application launcher backend";
|
||||
|
||||
package = lib.mkPackageOption pkgs "elephant" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.services.elephant = {
|
||||
description = "Elephant application launcher backend";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
ExecStart = "${cfg.package}/bin/elephant";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [
|
||||
saadndm
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user