1 { config, lib, pkgs, ... }:
4 inherit (lib) mkEnableOption mkIf mkOption types literalExpression;
6 cfg = config.services.isso;
8 settingsFormat = pkgs.formats.ini { };
9 configFile = settingsFormat.generate "isso.conf" cfg.settings;
14 enable = mkEnableOption ''
15 isso, a commenting server similar to Disqus.
17 Note: The application's author suppose to run isso behind a reverse proxy.
18 The embedded solution offered by NixOS is also only suitable for small installations
19 below 20 requests per second
24 Configuration for `isso`.
26 See [Isso Server Configuration](https://posativ.org/isso/docs/configuration/server/)
30 type = types.submodule {
31 freeformType = settingsFormat.type;
34 example = literalExpression ''
37 host = "http://localhost";
45 config = mkIf cfg.enable {
46 services.isso.settings.general.dbpath = lib.mkDefault "/var/lib/isso/comments.db";
48 systemd.services.isso = {
49 description = "isso, a commenting server similar to Disqus";
50 wantedBy = [ "multi-user.target" ];
58 StateDirectory = "isso";
61 ${pkgs.isso}/bin/isso -c ${configFile}
64 Restart = "on-failure";
68 CapabilityBoundingSet = [ "" ];
70 LockPersonality = true;
71 PrivateDevices = true;
75 ProtectControlGroups = true;
77 ProtectHostname = true;
78 ProtectKernelLogs = true;
79 ProtectKernelModules = true;
80 ProtectKernelTunables = true;
81 ProtectProc = "invisible";
82 RestrictAddressFamilies = [ "AF_INET" "AF_INET6" ];
83 RestrictNamespaces = true;
84 RestrictRealtime = true;
85 SystemCallArchitectures = "native";
86 SystemCallFilter = [ "@system-service" "~@privileged" "~@resources" ];