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

doc/nixos: Explain better NixOS specific Systemd stuff #98661

Merged
merged 1 commit into from Nov 6, 2020

Conversation

doronbehar
Copy link
Contributor

Divide the "Service Management" chapter into two sections. The 1st (the
original) explaining General, not NixOS specific ways to interact with
Systemd. The 2nd section, explaining NixOS specific things worth
knowing.

Explain in the 2nd section a bit NixOS modules and services of Nixpkgs,
and mention systemd.user.services option. Give an example
demonstrating how to enable imperatively an upstream provided unit file
for a user. Explain why systemctl --user enable doesn't work for the
long term on NixOS.

Motivation for this change

My own confusion regarding the subject + https://discourse.nixos.org/t/how-to-enable-upstream-systemd-user-services-declaratively/7649/5 .

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.

@doronbehar doronbehar force-pushed the doc/nixos/systemd-nixos-specific branch from fb4cb38 to b4ff865 Compare September 27, 2020 12:11
Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

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

Nit: systemd is spelled in lower case.

@doronbehar
Copy link
Contributor Author

Nit: systemd is spelled in lower case.

Correct. I've addressed that also in the parts I took as is.

Let's wait a bit on this PR, and see if anyone from #80038 will have something to comment / suggest to add.

@doronbehar doronbehar force-pushed the doc/nixos/systemd-nixos-specific branch from 6d9abdb to 4889fb3 Compare November 5, 2020 11:52
@doronbehar
Copy link
Contributor Author

I don't think there's anything more important to add and I think it's better to have this then nothing. Fixed the systemd spelling.

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

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

I agree, just fix the build error and I would merge.

Divide the "Service Management" chapter into two sections. The 1st (the
original) explaining General, not NixOS specific ways to interact with
Systemd. The 2nd section, explaining NixOS specific things worth
knowing.

Explain in the 2nd section a bit NixOS modules and services of Nixpkgs,
and mention `systemd.user.services` option. Give an example
demonstrating how to enable imperatively an upstream provided unit file
for a user. Explain why `systemctl --user enable` doesn't work for the
long term on NixOS.
@doronbehar doronbehar force-pushed the doc/nixos/systemd-nixos-specific branch from 4889fb3 to 8716b71 Compare November 6, 2020 09:37
@doronbehar
Copy link
Contributor Author

I agree, just fix the build error and I would merge.

Great. I fixed the typo and made sure it builds. Will wait for your final approval.

Copy link
Contributor

@rnhmjoj rnhmjoj left a comment

Choose a reason for hiding this comment

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

Thank you! Contribution to the docs are always greatly appreciated.

@rnhmjoj rnhmjoj merged commit 25d15eb into NixOS:master Nov 6, 2020
@doronbehar doronbehar deleted the doc/nixos/systemd-nixos-specific branch March 2, 2023 10:35
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