-[mqtt-exporter](https://github.com/kpetremann/mqtt-exporter/), a Prometheus exporter for exposing messages from MQTT. Available as [services.prometheus.exporters.mqtt](#opt-services.prometheus.exporters.mqtt.enable).
-[pocket-id](https://pocket-id.org/), an OIDC provider with passkeys support. Available as [services.pocket-id](#opt-services.pocket-id.enable).
-[nvidia-gpu](https://github.com/utkuozdemir/nvidia_gpu_exporter), a Prometheus exporter that scrapes `nvidia-smi` for GPU metrics. Available as [services.prometheus.exporters.nvidia-gpu](#opt-services.prometheus.exporters.nvidia-gpu.enable).
-[OpenGamepadUI](https://github.com/ShadowBlip/OpenGamepadUI/), an open source gamepad-native game launcher and overlay for Linux. Available as [programs.opengamepadui](#opt-programs.opengamepadui.enable).
The directory where Pocket ID will store its data, such as the database.
'';
};
user=mkOption{
type=str;
default="pocket-id";
description="User account under which Pocket ID runs.";
};
group=mkOption{
type=str;
default="pocket-id";
description="Group account under which Pocket ID runs.";
};
};
config=mkIfcfg.enable{
warnings=(
optional(cfg.settings?MAXMIND_LICENSE_KEY)
"config.services.pocket-id.settings.MAXMIND_LICENSE_KEY will be stored as plaintext in the Nix store. Use config.services.pocket-id.environmentFile instead."
);
systemd.tmpfiles.rules=[
"d ${cfg.dataDir} 0755 ${cfg.user}${cfg.group}"
];
systemd.services={
pocket-id-backend={
description="Pocket ID backend";
after=["network.target"];
wantedBy=["multi-user.target"];
restartTriggers=[
cfg.package
cfg.environmentFile
settingsFile
];
serviceConfig={
Type="simple";
User=cfg.user;
Group=cfg.group;
WorkingDirectory=cfg.dataDir;
ExecStart="${cfg.package}/bin/pocket-id-backend";
Restart="always";
EnvironmentFile=[
cfg.environmentFile
settingsFile
];
# Hardening
AmbientCapabilities="";
CapabilityBoundingSet="";
DeviceAllow="";
DevicePolicy="closed";
#IPAddressDeny = "any"; # communicates with the frontend
LockPersonality=true;
MemoryDenyWriteExecute=true;
NoNewPrivileges=true;
PrivateDevices=true;
PrivateNetwork=false;# communicates with the frontend
PrivateTmp=true;
PrivateUsers=true;
ProcSubset="pid";
ProtectClock=true;
ProtectControlGroups=true;
ProtectHome=true;
ProtectHostname=true;
ProtectKernelLogs=true;
ProtectKernelModules=true;
ProtectKernelTunables=true;
ProtectProc="invisible";
ProtectSystem="full";# needs to write in cfg.dataDir