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

switch-to-configuration: Add new option X-OnlyManualStart #82139

Merged
merged 1 commit into from Mar 10, 2020

Conversation

adisbladis
Copy link
Member

@adisbladis adisbladis commented Mar 9, 2020

This is to facilitate units that should only be manually started and not activated when a configuration is switched to.

More specifically this is to be used by the new Nixops deploy-* targets created in NixOS/nixops#1245 that are triggered by Nixops before/after switch-to-configuration is called.

Thank you to Yakkertech for sponsoring this work.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This is to facilitate units that should _only_ be manually started and
not activated when a configuration is switched to.

More specifically this is to be used by the new Nixops deploy-*
targets created in NixOS/nixops#1245 that are
triggered by Nixops before/after switch-to-configuration is called.
@adisbladis adisbladis changed the title switch-to-configuration: Add new option X-OnlyManualStart WIP: switch-to-configuration: Add new option X-OnlyManualStart Mar 9, 2020
@adisbladis adisbladis requested a review from grahamc March 9, 2020 11:42
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

I worry a bit about these directives have essentially zero documentation about their semantics, but here we are :p

:shipit:

@adisbladis adisbladis changed the title WIP: switch-to-configuration: Add new option X-OnlyManualStart switch-to-configuration: Add new option X-OnlyManualStart Mar 9, 2020
@adisbladis adisbladis changed the title switch-to-configuration: Add new option X-OnlyManualStart WIP: switch-to-configuration: Add new option X-OnlyManualStart Mar 9, 2020
@Mic92
Copy link
Member

Mic92 commented Mar 9, 2020

Do we have any in-tree examples, where this feature would be useful? This could document this feature at least to some extend.

@grahamc
Copy link
Member

grahamc commented Mar 9, 2020

I'm not sure we should need this second commit?

@Mic92
Copy link
Member

Mic92 commented Mar 9, 2020

It is not required, just nice to have.

@adisbladis adisbladis force-pushed the switch-to-configuration-manual branch from 5a4cb65 to db6c943 Compare March 9, 2020 15:45
@adisbladis adisbladis changed the title WIP: switch-to-configuration: Add new option X-OnlyManualStart switch-to-configuration: Add new option X-OnlyManualStart Mar 9, 2020
@adisbladis adisbladis merged commit 6fcce60 into NixOS:master Mar 10, 2020
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