diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 6cf6e5f1c1d1..b7f3406bc32e 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -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). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index cdd258e5b176..d6725e526a32 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/services/misc/elephant.nix b/nixos/modules/services/misc/elephant.nix new file mode 100644 index 000000000000..bcd6a3831478 --- /dev/null +++ b/nixos/modules/services/misc/elephant.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 + ]; +}