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: enable homed #98299

Merged
merged 2 commits into from Nov 3, 2020
Merged

systemd: enable homed #98299

merged 2 commits into from Nov 3, 2020

Conversation

Kloenk
Copy link
Member

@Kloenk Kloenk commented Sep 19, 2020

Motivation for this change

Fixes #91243
Contains #98998 (merged)

Things done

Please also see #72802 (comment)

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

CC: @Mic92 (changed your systemd patch)

@flokli
Copy link
Contributor

flokli commented Sep 20, 2020 via email

@Kloenk
Copy link
Member Author

Kloenk commented Sep 20, 2020

@flokli you mean for systemd-homed? first I have to understad it :-). I'm currently trying to rebuild my pc, and then figure out how homed works.

@Kloenk
Copy link
Member Author

Kloenk commented Sep 21, 2020

Should I add systemd-homed.service to upstreamSystemUnits in nixos/modules/system/boot/systemd.nix?
Not exactly sure how I would enable that unit if I include it in upstreamSystemUnits.

@lheckemann
Copy link
Member

Suggestion: add a Co-Authored-By mention of @kirelagin to acknowledge his initial work on this :)

@flokli
Copy link
Contributor

flokli commented Sep 23, 2020

@Kloenk is this ready for review?

We might want to degrade this to a draft PR until it has proven to work, and has a test ensuring it stays that way ;-)

@Kloenk
Copy link
Member Author

Kloenk commented Sep 23, 2020

Oh, yeah. It's a draft.
But I think I can't change it right now, as I only have my phone with me.

@Kloenk
Copy link
Member Author

Kloenk commented Sep 23, 2020

I think the way to continue with this should be:

  • figuring out how and what can be used from systemd-homed
  • write a nixos module, which then enables the systemd-homed service
  • write tests

@Kloenk
Copy link
Member Author

Kloenk commented Sep 25, 2020

I think the way to continue with this should be:

* [ ]  figuring out how and what can be used from systemd-homed

* [ ]  write a nixos module, which then enables the systemd-homed service

* [ ]  write tests

I installed that systemd on my main machine xD.
I can now create users via homectl create test and see via userdbctl user test that it was created via homectl. Is this a good thing to test?

@arianvp
Copy link
Member

arianvp commented Nov 2, 2020 via email

@vikanezrimaya
Copy link
Member

I agree on including this as a package. The module can be contributed later, and those who feel brave enough could try the new tech on their machines or VMs and help contributing the aforementioned module.

I would totally install this on a VM for testing!

@flokli
Copy link
Contributor

flokli commented Nov 2, 2020

Can we add a enableHomed flag, which still is set to false in our default systemd derivation?

That'd mean we won't ship untested features enabled by default, but people can get a systemd with homed, without rebuilding the world, by slightly overriding systemd.package.

@Ericson2314
Copy link
Member

Pity draft PRs don't get their conflict status updated. This certainly has cosmetic conflicts with #101886.

@Ericson2314
Copy link
Member

Also, do we have an issue on our end for the PAM debacle?

@Kloenk
Copy link
Member Author

Kloenk commented Nov 2, 2020

Will try to rebase and recheck tomorrow

@Kloenk
Copy link
Member Author

Kloenk commented Nov 3, 2020

Rebased, not yet tested if it builds and works

@flokli
Copy link
Contributor

flokli commented Nov 3, 2020

I successfully built both systemd and systemd.overrideAttrs ( old: { withHomed = true; } ).

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

This LGTM. This should unblock some more testing and toying with it without too many world rebuilds :-) Happy to flip the default once there's a module system integration and a VM test.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

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

OK applied my nit-pick and then cleanued up history to separate the bootstrapping changes from the changes to systemd proper. Looks all good to me now!

@flokli
Copy link
Contributor

flokli commented Nov 3, 2020 via email

@ofborg ofborg bot requested a review from prusnak November 3, 2020 21:47
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Looks good to me besides that comment typo.

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
This is disabled by default to indicate that is hasn't been adiquately
tested with NixOS yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
systemd
  
Done
Development

Successfully merging this pull request may close these issues.

systemd-homed support
9 participants