-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Activation as user service #3415
Comments
Currently I'm doing the following, which seems to work:
|
Also need this. I'm using pam_mount with luks encrypted user home partition and home-manager-${user}.service started too early. |
There's a PR at #2548, @Aleksanaa could you try that? Out of curiosity, why not mount your LUKS partition at boot? Does using pam_mount mean that you don't have to type your password twice? |
Thanks so much. The reason is that some fedora, archlinux and gentoo users like to have two separate encrypted partitions, one for root and another for user home. The first one is decrypted by cryptenroll which intergrates with tpm, and tpm can be set to make sure the secure boot state is enforced and firmware and signatures have not been tampered with, and we often call it trusted boot. The second is decrypted by pam modules when login, and the user's passphrase is the same with the partition's, so we don't have to input twice. These two measures ensure data security and avoid cold start attacks to a certain degree, while still not sacrificing convenience. Another advantage is if you share your computer with another user, both of you can easily protect your files from watching by each other. There are already plenty of personal blog, wiki and forum posts about it on those distros, even with silverblue they've done it. Surprisingly, I see no document with nixos on this. And I'm a new nixer trying to move all my archlinux config onto nixos, so I encountered this problem 🥲 |
That makes sense. Yeah, I think we're still very much figuring these things out in NixOS, e.g. secure boot is very recent work in progress. |
Anyway, is there an easy way of applying a pr? I'm using flake and home-manager as nixos module. |
Yeah, add |
Everything works flawlessly for me! |
#2548 seems like the way to go, thanks! |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
This is still very important for us. Without activation as user service, we can't easily handle more complicated situations of home directory. |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
My situation wrt. to this issue hasn't changed |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/encrypted-root-with-single-password-prompt/17054/9 |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
? |
Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting. If you are the original author of the issue
If you are not the original author of the issue
Memorandum on closing issuesDon't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort. |
Please consider to apply this change. |
Description
I manage a system that has it's root fs on tmpfs and mounts user homes on login via pam_mount over cifs.
I use the nixos module to manage user environments.
The
home-manager-${userName}.service
units seem to run on boot, far before any user has logged in and their home directory becomes available.It would be helpful if there was a builtin way to have home-manager activation occur as a systemd user service as early as possible, probably before/as a part of
basic.target
?Maybe that should even be the default way to do activation for the nixos module?
The text was updated successfully, but these errors were encountered: