Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upExperimental NixOS module #97
Conversation
rycee
self-assigned this
Oct 20, 2017
rycee
referenced this pull request
Nov 24, 2017
Closed
Add NixOS module to configure users with home manager #18
rycee
referenced this pull request
Dec 2, 2017
Closed
Return a derivation fn in main nix expression #137
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Dec 11, 2017
Owner
Turns out it is better to use just a path in the imports field. In particular this improves error messages.
So suggested import attribute is now
{
# …
imports = [
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/nixos-module.tar.gz}/nixos"
];
# …
}|
Turns out it is better to use just a path in the So suggested import attribute is now {
# …
imports = [
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/nixos-module.tar.gz}/nixos"
];
# …
} |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Dec 18, 2017
Contributor
I gave this a try, and it seems to work so far :-)
When moving to this, I tried separating home-manager config into different files, and wanted to use imports for that, but on the home-manager.users.<name>.imports level (with the imported files only returning the subtree, like in ~/.config/nixpkgs/home.nix previously.
Am I missing something obvious, or it that not really possible currently?
|
I gave this a try, and it seems to work so far :-) When moving to this, I tried separating home-manager config into different files, and wanted to use Am I missing something obvious, or it that not really possible currently? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Dec 18, 2017
Owner
@flokli Currently I personally simply use import, e.g.,
home-manager.users.rah = import ./home-rah.nix;
but when I try directly using imports as you mentioned it doesn't work. Instead I had to make the option a full module (i.e., a function):
home-manager.users.rah = {...}: { imports = [ ./home-rah.nix ]; };
|
@flokli Currently I personally simply use
but when I try directly using
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Infinisil
Dec 18, 2017
Collaborator
I am using this branch now too for my machines and it's working great! One thing that would be nice (but I'm not sure how to do it) is to automatically set the <user>.home.username and <user>.home.homeDirectory to config.users.users.<user>.name and config.users.users.<user>.home. Something like this:
{
home-manager.users = mapAttrs (username: usercfg: {
home.username = config.users.users.${username}.name;
home.homeDirectory = config.users.users.${username}.home;
}) config.home-manager.users;
}But this doesn't work because of infinite recursion. Perhaps these 2 arguments can be passed to the submodule somehow else though. Right now I'm doing this manually for each user.
|
I am using this branch now too for my machines and it's working great! One thing that would be nice (but I'm not sure how to do it) is to automatically set the {
home-manager.users = mapAttrs (username: usercfg: {
home.username = config.users.users.${username}.name;
home.homeDirectory = config.users.users.${username}.home;
}) config.home-manager.users;
}But this doesn't work because of infinite recursion. Perhaps these 2 arguments can be passed to the submodule somehow else though. Right now I'm doing this manually for each user. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@Infinisil Good point! I pushed a commit that should fix this. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Dec 18, 2017
Contributor
@rycee I tried using something like
home-manager.users.flokli = {...}: { imports = [ ./one.nix ./two.nix ]; };
With one.nix and two.nix looking similar to:
{ pkgs, ... }:
{
home.packages = with pkgs; [
...
];
}
It seems like merging doesn't happen as it should. For example, as long as I have one home.packages defined, those binaries appear in $PATH inside the users Xsession, but as soon as there are two (in different files), none of those binaries appear.
Do you have an idea what's going on here?
|
@rycee I tried using something like
With
It seems like merging doesn't happen as it should. For example, as long as I have one Do you have an idea what's going on here? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Dec 18, 2017
Owner
@flokli Hmm, i'm unable to reproduce this. I changed
home-manager.users.rah = {...}: { imports = [ ./home-rah.nix ]; };
in my configuration to
home-manager.users.rah = {...}: { imports = [ ./home-rah.nix ./test.nix ]; };
where text.nix contains
{ pkgs, ... }:
{
home.packages = [ pkgs.hello ];
}
After doing nixos-rebuild switch and restarting the affected container both my old packages and the hello package was available. Note, the home-rah.nix file contains a home.packages setting and also imports other files that adds additional packages to home.packages.
This works for me through both NixOps and NixOS declarative containers. But when I'm in a declarative NixOS container I seem to have to run the switch service manually (or restart the container). Try running $ sudo systemctl start home-manager-$USER.service as your user inside the container in that case.
|
@flokli Hmm, i'm unable to reproduce this. I changed
in my configuration to
where
After doing This works for me through both NixOps and NixOS declarative containers. But when I'm in a declarative NixOS container I seem to have to run the switch service manually (or restart the container). Try running |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Dec 18, 2017
Contributor
It looks like home-manager-flokli.service fails to setup the environment completely:
(test inside nixos-rebuild build-vm in my case)
● home-manager-flokli.service - Home Manager environment for flokli
Loaded: loaded (/nix/store/hd0g6dinx1fp7i0zsw1dkyrm3icxixi9-unit-home-manager-flokli.service/home-manager-flokli.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-12-18 22:25:23 CET; 6min ago
Process: 636 ExecStart=/nix/store/1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli (code=exited, status=1/FAILURE)
Main PID: 636 (code=exited, status=1/FAILURE)
CPU: 55ms
Dec 18 22:25:18 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: Activating writeBoundary
Dec 18 22:25:18 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: Activating installPackages
Dec 18 22:25:18 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: installing ‘home-manager-path’
Dec 18 22:25:23 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels’ does not exist, ignoring
Dec 18 22:25:23 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: building path(s) ‘/nix/store/xb6j4zjfdd06h14fyl9in3ws0n8hc7h1-user-environment’
Dec 18 22:25:23 tp-vm 1hhgd5nrzhzqygnaijmh6s3z89q7g5v9-activate-flokli[636]: error: linking ‘/nix/store/hdmyg5hnqzrycyp4qv2g48sn68a92w7s-user-environment.drv.chroot/nix/store/7ky19m5bv1z4vin5rwvvwr1wgqwgyi6f-fix-qt-module-paths.sh’ to ‘/nix/store/7ky19m5bv1z4vin5rwvvwr1wgqwgyi6f-fix-qt-module-paths.sh’: Operation not permitted
Dec 18 22:25:23 tp-vm systemd[1]: home-manager-flokli.service: Main process exited, code=exited, status=1/FAILURE
Dec 18 22:25:23 tp-vm systemd[1]: Failed to start Home Manager environment for flokli.
Dec 18 22:25:23 tp-vm systemd[1]: home-manager-flokli.service: Unit entered failed state.
Dec 18 22:25:23 tp-vm systemd[1]: home-manager-flokli.service: Failed with result 'exit-code'.
When specifying home.packages only once, it succeeds:
● home-manager-flokli.service - Home Manager environment for flokli
Loaded: loaded (/nix/store/bmr4356avmibcmz7bmlac69cmsvfpqnj-unit-home-manager-flokli.service/home-manager-flokli.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2017-12-18 22:37:06 CET; 1min 29s ago
Process: 636 ExecStart=/nix/store/1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli (code=exited, status=0/SUCCESS)
Main PID: 636 (code=exited, status=0/SUCCESS)
CPU: 81ms
Dec 18 22:37:00 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: Activating installPackages
Dec 18 22:37:00 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: installing ‘home-manager-path’
Dec 18 22:37:05 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels’ does not exist, ignoring
Dec 18 22:37:05 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: building path(s) ‘/nix/store/bwjgyz45br7iw6m1wc18r4kskma5v8hp-user-environment’
Dec 18 22:37:06 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: created 7 symlinks in user environment
Dec 18 22:37:06 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: Activating linkGeneration
Dec 18 22:37:06 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: Creating profile generation 1
Dec 18 22:37:06 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: Creating home file links in /home/flokli
Dec 18 22:37:06 tp-vm 1rpd6b32yk5vb4ibznfg35bpsq030x6r-activate-flokli[636]: Activating reloadI3
Dec 18 22:37:06 tp-vm systemd[1]: Started Home Manager environment for flokli.
So it looks like it's a misbehaving qt hook. I'll try to identify the culprit.
|
It looks like
When specifying
So it looks like it's a misbehaving qt hook. I'll try to identify the culprit. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Dec 18, 2017
Contributor
Confirmed. As soon as a QT application is added to home.packages, home-manager-$user.service fails to setup the environment.
This is also reproducible without using imports, but the structure suggested in the initial description.
|
Confirmed. As soon as a QT application is added to |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Dec 18, 2017
Contributor
Unrelated to the QT problem, after a reboot, home-manager-$user.service seems to fail, too:
● home-manager-flokli.service - Home Manager environment for flokli
Loaded: loaded (/nix/store/4njqy7yrim53xkri4vcm726ph96b1bh0-unit-home-manager-flokli.service/home-manager-flokli.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2017-12-19 00:07:52 CET; 58s ago
Process: 611 ExecStart=/nix/store/0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli (code=exited, status=1/FAILURE)
Main PID: 611 (code=exited, status=1/FAILURE)
CPU: 83ms
Dec 19 00:07:47 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: Activating checkLinkTargets
Dec 19 00:07:47 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: Activating writeBoundary
Dec 19 00:07:47 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: Activating installPackages
Dec 19 00:07:47 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: installing ‘home-manager-path’
Dec 19 00:07:52 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: warning: Nix search path entry ‘/nix/var/nix/profiles/per-user/root/channels’ does not exist, ignoring
Dec 19 00:07:52 tp-vm 0mb9zq07zggbjjsc0695clv395xyxp2c-activate-flokli[611]: error: opening file ‘/nix/store/0pajyli2bx82p59hxw6ygn4anaafbgdl-user-environment.drv’: No such file or directory
Dec 19 00:07:52 tp-vm systemd[1]: home-manager-flokli.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 00:07:52 tp-vm systemd[1]: Failed to start Home Manager environment for flokli.
Dec 19 00:07:52 tp-vm systemd[1]: home-manager-flokli.service: Unit entered failed state.
Dec 19 00:07:52 tp-vm systemd[1]: home-manager-flokli.service: Failed with result 'exit-code'.
|
Unrelated to the QT problem, after a reboot,
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Dec 19, 2017
Owner
@flokli I believe I have fixed this issue now. Unfortunately the fix seems to expose a few bugs in NixOS. For example, qt programs cannot find qt plugins and fontconfig doesn't seem to see installed fonts. I pushed the nixos-module-user-pkgs branch that includes the fix commit so you can try importing
"${builtins.fetchTarball https://github.com/rycee/home-manager/archive/nixos-module-user-pkgs.tar.gz}/nixos"
I will try looking in to what can be done on the NixOS side (the issue is that things don't consider packages installed through users.users.<name?>.packages)…
|
@flokli I believe I have fixed this issue now. Unfortunately the fix seems to expose a few bugs in NixOS. For example, qt programs cannot find qt plugins and fontconfig doesn't seem to see installed fonts. I pushed the
I will try looking in to what can be done on the NixOS side (the issue is that things don't consider packages installed through |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Jan 9, 2018
Contributor
I tinkered around with it a bit more, it seems there is currently no way to set nixpkgs.config.allowUnfree = true for packages that should be installed inside the user environment context (and the nixpkgs.config.allowUnfree from above is not respected).
|
I tinkered around with it a bit more, it seems there is currently no way to set |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Infinisil
Jan 26, 2018
Collaborator
An issue I just discovered is that the users systemd daemon isn't reloaded automatically, so it still uses the old unit files until a manual systemctl --user daemon-reload
|
An issue I just discovered is that the users systemd daemon isn't reloaded automatically, so it still uses the old unit files until a manual |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Jan 27, 2018
Owner
@Infinisil It was quite tricky but I think I figured it out nixos-rebuild switch happens then the HM system service for the user will try to do the regular user systemd daemon reload as if running home-manager switch. If the user is not logged in then the systemd part will be skipped.
|
@Infinisil It was quite tricky but I think I figured it out |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Jan 27, 2018
Owner
@flokli Sorry for leaving you waiting for so long. I've looked into the nixpkgs config option a bit. It is true that the nixpkgs.config value of the system will be ignored inside the home-manager.user option. But from what I can tell you can use the HM nixpkgs module. E.g., having
home-manager.user.foo.nixpkgs.allowUnfree = true
in my system configuration seems to work for me.
I think it would be possible to make the home-manager.user option honor the system nixpkgs module but I'm not sure about the best semantics w.r.t merging the configurations. Generally I would like to have a user HM configuration managed through the NixOS module work as close as possible to managing it through the home-manager tool and in that case it won't honor the system nixpkgs configuration.
|
@flokli Sorry for leaving you waiting for so long. I've looked into the nixpkgs config option a bit. It is true that the
in my system configuration seems to work for me. I think it would be possible to make the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
throwup
Jan 30, 2018
This does not seem to work for me, I get an error when trying to rebuild with the home manager enabled, regardless of what I put inside home-manager.users.<username>. What could I be missing?
● home-manager-leo.service - Home Manager environment for leo
Loaded: loaded (/nix/store/gfqfyrhnybz49six90aqbiz671054d2i-unit-home-manager-leo.service/home-manager-leo.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-01-30 23:20:35 CET; 19ms ago
Process: 5571 ExecStart=/nix/store/vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo (code=exited, status=2)
Main PID: 5571 (code=exited, status=2)
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: Activating linkGeneration
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: Cleaning up orphan links from /home/leo
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: No change so reusing latest profile generation 4
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: Creating home file links in /home/leo
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: Activating reloadSystemD
Jan 30 23:20:35 nixos vfnnbv78l5lvb52svg8sv82qp3kzj5xp-activate-leo[5571]: /nix/store/35ifr39r4119si4a7mij5dl8vs571c7c-home-manager-generation/activate: line 140: syntax error near unexpected token `('
Jan 30 23:20:35 nixos systemd[1]: home-manager-leo.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 30 23:20:35 nixos systemd[1]: Failed to start Home Manager environment for leo.
Jan 30 23:20:35 nixos systemd[1]: home-manager-leo.service: Unit entered failed state.
Jan 30 23:20:35 nixos systemd[1]: home-manager-leo.service: Failed with result 'exit-code'.
warning: error(s) occurred while switching to the new configuration
throwup
commented
Jan 30, 2018
|
This does not seem to work for me, I get an error when trying to rebuild with the home manager enabled, regardless of what I put inside
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Infinisil
Jan 30, 2018
Collaborator
@throwup Please show your configuration.nix and the contents of /nix/store/35ifr39r4119si4a7mij5dl8vs571c7c-home-manager-generation/activate (use something like https://gist.github.com/)
|
@throwup Please show your |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
throwup
Jan 30, 2018
@Infinisil here:
configuration.nix: https://gist.github.com/throwup/a74be9e1b11e7536f70f9fab60502dd1
home-manager-generation/activate: https://gist.github.com/throwup/4ba545d77fe5d33e2cf29c9c868a0026
throwup
commented
Jan 30, 2018
|
@Infinisil here: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Infinisil
Jan 31, 2018
Collaborator
@throwup Ah, i see, @rycee broke it with the latest commit in this branch :). Right here: 5af0d40#diff-40cef6e54189bc6970bd2e6427de09e6R165
This doesn't work because legacyReloadCmd is a huge string representing a shell script, not inlineable
|
@throwup Ah, i see, @rycee broke it with the latest commit in this branch :). Right here: 5af0d40#diff-40cef6e54189bc6970bd2e6427de09e6R165 This doesn't work because |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
throwup
Jan 31, 2018
@Infinisil Ok, that makes sense (I think). So do you suggest just waiting until it's fixed, or is there anything I can do?
throwup
commented
Jan 31, 2018
|
@Infinisil Ok, that makes sense (I think). So do you suggest just waiting until it's fixed, or is there anything I can do? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Infinisil
Jan 31, 2018
Collaborator
@throwup What you can do is just use the previous commit until it's fixed:
{
imports = [
(import (builtins.fetchTarball https://github.com/rycee/home-manager/archive/804d1f4872dca47cd53ea566399ca489db678599.tar.gz) {}).nixos
];
}(Untested but 99% sure this should work)
|
@throwup What you can do is just use the previous commit until it's fixed: {
imports = [
(import (builtins.fetchTarball https://github.com/rycee/home-manager/archive/804d1f4872dca47cd53ea566399ca489db678599.tar.gz) {}).nixos
];
}(Untested but 99% sure this should work) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Jan 31, 2018
Owner
@throwup Sorry for the problems you've been having! I've been slowly working on a test framework that would have caught this type of silly coding errors but it's still in the pipeline :-(
In any case, I've pushed a new version that should fix the error. Please give it a try.
|
@throwup Sorry for the problems you've been having! I've been slowly working on a test framework that would have caught this type of silly coding errors but it's still in the pipeline :-( In any case, I've pushed a new version that should fix the error. Please give it a try. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
throwup
Feb 1, 2018
@rycee Hey, there's absolutely no need to apologize! With WIP-features you have to expect that some thing don't always work and it's not like I lost any considerable time/work through this bug. Moreover, you are working on this in your free time, for free so if anything I'd have to thank you for the great tools you are providing to all of us!
throwup
commented
Feb 1, 2018
•
|
@rycee Hey, there's absolutely no need to apologize! With WIP-features you have to expect that some thing don't always work and it's not like I lost any considerable time/work through this bug. Moreover, you are working on this in your free time, for free so if anything I'd have to thank you for the great tools you are providing to all of us! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Feb 3, 2018
Owner
@throwup Cool, thanks :-D Does it work OK for you now?
Unless anybody has major concern I'll put together some news entry and merge this to master as an "experimental feature". Ideally we'll be able to get the user-pkg branch to work but there are still some issues with Qt applications installed that way.
|
@throwup Cool, thanks :-D Does it work OK for you now? Unless anybody has major concern I'll put together some news entry and merge this to master as an "experimental feature". Ideally we'll be able to get the user-pkg branch to work but there are still some issues with Qt applications installed that way. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rummik
Feb 4, 2018
The example in the PR works well for me
I did run into some issues with an apparent local copy of Git on one system; the error output from the systemd service was a bit unclear about why a collision was occurring, so it took a little head scratching to figure out what was happening.
Unfortunately I didn't think to keep any logs, or I'd leave them here, but steps to reproduce should essentially be:
- Run
nix-env -iA nixos.git - Configure Git options through home-manager
- Run a
nixos-rebuild test-- it doesn't fail until after starting the service and attempting to add the configuration for Git
To fix it I just had to do a nix-env -e git, but it would be pretty neat to have it say as much in the service error log
rummik
commented
Feb 4, 2018
•
|
The example in the PR works well for me I did run into some issues with an apparent local copy of Git on one system; the error output from the systemd service was a bit unclear about why a collision was occurring, so it took a little head scratching to figure out what was happening. Unfortunately I didn't think to keep any logs, or I'd leave them here, but steps to reproduce should essentially be:
To fix it I just had to do a |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
throwup
Feb 4, 2018
At the moment most of the things work for me, however I might have found some bugs:
home.sessionVariables does not seem to work for me. I get no errors, but the Variables are not set.
home.keyboard.layout/variants/options also does not do anything (this is meant for setting the Xserver keyboard, correct?)
throwup
commented
Feb 4, 2018
|
At the moment most of the things work for me, however I might have found some bugs: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Feb 5, 2018
Owner
@throwup Yeah, at the moment the home.keyboard.* options are only applied when xsession.enable is set and will only affect the X session. Ideally this should change to use localectl and not be dependent on HM managing the X session.
For the session variables, are you using Home Manager to manage your Bash or Z shell configurations? If not then you unfortunately must source the ~/.nix-profile/etc/profile.d/hm-session-vars.sh file manually.
|
@throwup Yeah, at the moment the For the session variables, are you using Home Manager to manage your Bash or Z shell configurations? If not then you unfortunately must source the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Feb 5, 2018
Owner
@rummik Yeah, this collision problem is a bit unfortunate and several people have been bitten by it. The problem does not just apply to using Home Manager as a NixOS module but also when running through the home-manager tool. I've added a FAQ that includes the collision problem but like you said some more clear error would be nice.
|
@rummik Yeah, this collision problem is a bit unfortunate and several people have been bitten by it. The problem does not just apply to using Home Manager as a NixOS module but also when running through the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
flokli
Feb 6, 2018
Contributor
@rycee I'd suggest adding a separate issue for the home.keyboard.* options to be set via localectl, and get this one in soon :-)
|
@rycee I'd suggest adding a separate issue for the |
rycee
changed the title from
[WIP] Experimental NixOS module
to
Experimental NixOS module
Feb 6, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
rycee
Feb 6, 2018
Owner
Ok, I've added a news entry and removed the WIP tag. It's a bit late to merge today so I will try to do it tomorrow. If there are any last major concerns then now is the time to raise them
I also added a commit that should make the log entries for the activation scripts a bit prettier.
Edit: Btw, I'll make sure not to immediately delete the branch after merge to allow people some time to switch over their import expressions.
|
Ok, I've added a news entry and removed the WIP tag. It's a bit late to merge today so I will try to do it tomorrow. If there are any last major concerns then now is the time to raise them I also added a commit that should make the log entries for the activation scripts a bit prettier. Edit: Btw, I'll make sure not to immediately delete the branch after merge to allow people some time to switch over their import expressions. |
rycee
merged commit 1bc59f7
into
master
Feb 7, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
yay :-) |
rycee commentedOct 14, 2017
•
edited
Edited 2 times
-
rycee
edited Nov 25, 2017 (most recent)
-
rycee
edited Oct 14, 2017
With this it is possible to put, e.g.,
{ # … imports = [ (import (builtins.fetchTarball https://github.com/rycee/home-manager/archive/nixos-module.tar.gz) {}).nixos ]; users.users.jimdumree.isNormalUser = true; home-manager.users.jimdumree = { home.file."TEST".text = "foo"; home.packages = [ pkgs.nload ]; services.random-background = { enable = true; imageDirectory = "bgs"; }; }; # … }in the system
configuration.nixand the user environment will be set up whennixos-rebuild switchruns. No need to install Home Manager first.Hacky for now and some HM modules won't work.