New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plexpy: init at 1.4.25 #30847
plexpy: init at 1.4.25 #30847
Conversation
Same here as in #30850, lots of commits that do not belong and also needs squashing. |
}; | ||
}; | ||
|
||
networking.firewall = mkIf cfg.openFirewall { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Services should generally not modify firewall rules.
Group = cfg.group; | ||
PermissionsStartOnly = "true"; | ||
GuessMainPID = "false"; | ||
ExecStart = "${cfg.package}/bin/plexpy --datadir ${cfg.dataDir} --config ${cfg.configFile} --port ${toString cfg.port} --pidfile ${cfg.dataDir}/plexpy.pid --daemon --nolaunch"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably not run as a daemon. It looks to me like plexpy supports running in the foreground.
Change this and set Type = "simple";
.
pkgs/servers/plexpy/default.nix
Outdated
sha256 = "0a4ynrfamlwkgqil4n61v47p21czxpjdzg0mias4kdjam2nnwnjx"; | ||
}; | ||
|
||
phases = "unpackPhase installPhase fixupPhase"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't set phases. Instead, if you do not need a certain phase, you could write buildPhase = ":";
.
pkgs/servers/plexpy/default.nix
Outdated
|
||
# Remove superfluous Python checks from main script; | ||
# prepend shebang | ||
echo "#!${python}/bin/python" > $out/PlexPy.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${python.interpreter}
instead of ${python}/bin/python}
Thanks for your feedback. I've incorporated the suggested changes; it builds fine as you'd expect. |
description = "TCP port where PlexPy listens."; | ||
}; | ||
|
||
openFirewall = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used anywhere anymore.
Can you squash commits into two separate commits: one for the package and one for the service. |
All right sir, try this. Apologies for non-existent VCS skills. |
Motivation for this change
PlexPy is a monitoring daemon for Plex Media Server, which is already in nixpkgs. It's popular with Plex users because it adds significant functionality. It's pretty good code and it's actively maintained.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)