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

systemd: Added an option to set default systemd.exec config #20335

Closed
wants to merge 1 commit into from

Conversation

spacekitteh
Copy link
Contributor

@spacekitteh spacekitteh commented Nov 11, 2016

Motivation for this change

Allows you to add default options for system.exec units.

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
    • Linux
  • 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.

@mention-bot
Copy link

@spacekitteh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @rickynils and @bluescreen303 to be potential reviewers.

@edolstra
Copy link
Member

What's the use case for this? The example of setting NoNewPrivileges globally seems like it would break at least some services. In general, it seems hard to reason about the correctness of setting an option for all units.

@spacekitteh
Copy link
Contributor Author

Some other examples would be Personality=s390x (what uname reports);
setting TTYPath=/dev/tty3 and StandardOutput=tty; or Environment="some env
vars here".

In my case of NoNewPrivileges, I'm going to set it to lock my box down, and
also be using it to see just how much actually breaks; if something
breaks I'll try to fix them.

On Fri, 11 Nov 2016 at 19:29 Eelco Dolstra notifications@github.com wrote:

What's the use case for this? The example of setting NoNewPrivileges
globally seems like it would break at least some services. In general, it
seems hard to reason about the correctness of setting an option for all
units.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20335 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB2crEwUqlZtHmMzNYddxGsa2TnKmycJks5q9DWDgaJpZM4KvZ9d
.

@edolstra
Copy link
Member

I don't think we should add options that really cannot be used correctly. If you want to experiment with NoNewPrivileges, you can just change your local Nixpkgs tree, of course.

This option could be useful if it's marked with internal = true to implement distro-wide defaults. But it should not be exposed to users.

@spacekitteh
Copy link
Contributor Author

How are the examples I gave not correct use cases?

On Fri, 11 Nov 2016 at 19:46 Eelco Dolstra notifications@github.com wrote:

I don't think we should add options that really cannot be used correctly.
If you want to experiment with NoNewPrivileges, you can just change your
local Nixpkgs tree, of course.

This option could be useful if it's marked with internal = true to
implement distro-wide defaults. But it should not be exposed to users.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#20335 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB2crP4slqBL0rYCSsXiA01xqsXp0pRvks5q9DmHgaJpZM4KvZ9d
.

@grahamc
Copy link
Member

grahamc commented Nov 12, 2016

The use case of "testing to see what breaks" is fine, and is why @edolstra mentioned it being marked as internal. However, this kind of deep mucking about in NixOS is very easy to accomplish with a local clone, no PRs required.

It is very unlikely there will be a single option a regular user will be safely able to add to every unit, without causing breakage. I think this is what he means by the option can't be used correctly.

@Mic92
Copy link
Member

Mic92 commented Jun 10, 2017

Closed because of common disagreement.

@Mic92 Mic92 closed this Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants