Skip to content
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

Add autoStart option for Kafka and Zookeeper services #34613

Closed
wants to merge 2 commits into from

Conversation

markus1189
Copy link
Contributor

@markus1189 markus1189 commented Feb 5, 2018

Motivation for this change

I prefer to define them in my configuration, but not have them started automatically. I took the approach from the openvpn service and added options to disable auto start.

I tried to test this, but a

nixos-rebuild switch -I nixpkgs=/my/nixpkgs

failed with:

The unique option `powerManagement.cpuFreqGovernor' is defined multiple times, in `/etc/nixos/hardware-configuration.nix' and `/my/nixpkgs/nixos/modules/config/power-management.nix'.       

So please take a careful look (See comment, was able to test)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@markus1189
Copy link
Contributor Author

Found a typo and tested it locally. Works for me

@Mic92
Copy link
Member

Mic92 commented Feb 10, 2018

I'm not in favor in adding an autoStart option to every possible service, we have in NixOS.
Currently it is possible to disable auto start by using:

systemd.targets.openssh.wantedBy = lib.mkOverride 50 [];

I would propose to either document this method or provide a more general option that works for every system (global option or function).

@markus1189
Copy link
Contributor Author

markus1189 commented Feb 11, 2018 via email

@markus1189 markus1189 closed this Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants