1 { config, lib, pkgs, ... }:
7 cfg = config.services.slimserver;
12 services.slimserver = {
17 description = lib.mdDoc ''
18 Whether to enable slimserver.
24 default = pkgs.slimserver;
25 defaultText = literalExpression "pkgs.slimserver";
26 description = lib.mdDoc "Slimserver package to use.";
31 default = "/var/lib/slimserver";
32 description = lib.mdDoc ''
33 The directory where slimserver stores its state, tag cache,
43 config = mkIf cfg.enable {
45 systemd.tmpfiles.rules = [
46 "d '${cfg.dataDir}' - slimserver slimserver - -"
49 systemd.services.slimserver = {
50 after = [ "network.target" ];
51 description = "Slim Server for Logitech Squeezebox Players";
52 wantedBy = [ "multi-user.target" ];
56 # Issue 40589: Disable broken image/video support (audio still works!)
57 ExecStart = "${cfg.package}/slimserver.pl --logdir ${cfg.dataDir}/logs --prefsdir ${cfg.dataDir}/prefs --cachedir ${cfg.dataDir}/cache --noimage --novideo";
63 description = "Slimserver daemon user";
68 groups.slimserver = {};