Commit graph

6 commits

Author SHA1 Message Date
Robert Helgesson afd2d0fb84
fontconfig: make fonts accessible when in NixOS module
(cherry picked from commit 799a90ecfa)
2019-02-23 22:58:47 +01:00
Robert Helgesson 2bdaf4ae98
nixos module: support NixOS user packages install
When using the NixOS module we cannot guarantee that the Nix store
will be writable during startup. Installing the user packages through
`nix-env -i` will fail in these cases.

This commit adds a NixOS option `home-manager.useUserPackages` that,
when enabled, installs user packages through the NixOS

    users.users.<name?>.packages

option.

Note, when submodule support and external package install is enabled
then the installed packages are not available in `~/.nix-profile`. We
therefore set `home.profileDirectory` directly to the HM profile
packages.

(cherry picked from commit ef168979bf)
2019-02-23 22:58:47 +01:00
Ingolf Wanger fdb81a7ea0
nixos: use correct username for systemd service
(cherry picked from commit fbdb5beb59)
2019-02-11 01:22:02 +01:00
Robert Helgesson 1c3614cbc8
Clean up support code for Home Manager as a submodule
This removes the `nixosSubmodule` option in favor of a new option
`submoduleSupport.enable`. This name better indicates that the
submodule mode applies to both NixOS and nix-darwin.

(cherry picked from commit 2f372ab4d6)
2019-02-11 01:22:02 +01:00
Robert Helgesson 9570cedff6
nixos module: we need a running nix-daemon
Make sure the nix-daemon is prepared before we attempt to do the user
activation otherwise the script may fail due to not being able to
communicate.
2018-07-21 13:15:34 +02:00
Robert Helgesson 1bc59f7290
allow Home Manager to be used as a NixOS module
This is a NixOS module that is intended to be imported into a NixOS
system configuration. It allows the system users to be set up directly
from the system configuration.

The actual profile switch is performed by a oneshot systemd unit per
configured user that acts much like the regular `home-manager switch`
command.

With this implementation, the NixOS module does not work properly with
the `nixos-rebuild build-vm` command. This can be solved by using the
`users.users.<name?>.packages` option to install packages but this
does not work flawlessly with certain Nixpkgs packages. In particular,
for programs using the Qt libraries.
2018-02-07 20:50:01 +01:00