diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-11-23 17:31:33 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-11-23 17:31:33 +0530 |
| commit | 0ff25a315c87a30963ee6be4799d0f30fe911f7f (patch) | |
| tree | ccfbec6df2adc9356abf2644f49c01883f2b4b81 /services/lazylibrarian/default.nix | |
| parent | f5f2198da113394bc14e0bfad4e4aaa9ec038033 (diff) | |
| download | homeserver-nixos-config-0ff25a315c87a30963ee6be4799d0f30fe911f7f.tar.gz homeserver-nixos-config-0ff25a315c87a30963ee6be4799d0f30fe911f7f.zip | |
Lazylibrarian service (without docker)
Diffstat (limited to 'services/lazylibrarian/default.nix')
| -rw-r--r-- | services/lazylibrarian/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/services/lazylibrarian/default.nix b/services/lazylibrarian/default.nix new file mode 100644 index 0000000..4514713 --- /dev/null +++ b/services/lazylibrarian/default.nix @@ -0,0 +1,32 @@ +{ config, pkgs, lib, ... }: +with lib; +let + lazylibrarian = pkgs.callPackage ./package.nix {}; + cfg = config.services.lazylibrarian; +in +{ + options.services.lazylibrarian = { + enable = mkEnableOption "lazy librarian"; + # port = mkOption { type = types.int; default = 53; }; + # hosts = mkOption { type = types.attrsOf types.str; default = {}; }; + }; + + environment.systemPackages = [lazylibrarian]; + + config.systemd.services.lazylibrarian = mkIf cfg.enable { + description = "Lazylibrarian"; + after = [ "network.service" ]; + wantedBy = [ "multi-user.target" ]; + + serviceConfig = { + ExecStart = "${lazylibrarian}/bin/lazylibrarian"; + Restart = "on-failure"; + RestartSec = 3; + TimeoutSec = "5min"; + IgnoreSIGPIPE = "no"; + KillMode = "process"; + GuessMainPID = "no"; + RemainAfterExit = "yes"; + }; + }; +} |
