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
squid service: initial service based on default config #27256
Conversation
Type="forking"; | ||
PIDFile="/run/squid.pid"; | ||
PermissionsStartOnly = true; | ||
ExecStart = "${pkgs.squid}/bin/squid -YCs -f ${squidConfig}"; |
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.
Use lib.escapeShellArg
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.
I don't think anything needs escaping. All arguments are fixed and the config file path is generated. Do I miss something?
I did run this for some time now and it works. So for basic proyxing it is enough to do I think it can be merged. |
@bjornfor systemd service description is now starting with capital letter. |
@fpletz this is no longer WIP |
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.
Thanks! This module is nice and easy so we'll squeeze it into 17.09. :)
Motivation for this change
Allow to run squid as a NixOS service.
This is work in progress the configuration is based on the the default configuration to make the service work. Currently only the port can be configured.
I'm planning to allow some more configuration by taking inspiration from NethServer.
This is still work in progress but as I'm new to squid and the config is pretty complex I already share my work in case there is a squid expert around wanting to help out.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)