aboutsummaryrefslogtreecommitdiff
path: root/modules/home-environment.nix (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-07-14home-environment: use per-user profile path in /etcRobert Helgesson1-1/+1
Before the profile directory value would point directly to the build output in the Nix store. Unfortunately this would cause an infinite loop if the user's configuration directly or indirectly refers to the profile directory value. Fixes #1188
2020-06-06home-environment: add full locale options supportJakub FiŔer1-6/+77
Allows setting every locale option independently. Also fixes `LC_` order to match the order of `locale` command output for better reference. PR #1278
2020-05-26Deprecate use of `builtins.getEnv`Robert Helgesson1-5/+17
This removes the use of the non-deterministic function `builtins.getEnv` for state version ā‰„ 20.09. PR #1269
2020-04-10home-environment: minor fix of DocBook codeRobert Helgesson1-2/+2
2020-04-08home-environment: add option `sessionVariablesExtra`Robert Helgesson1-1/+11
This is an internal option for adding additional code to `hm-session-vars.sh`.
2020-01-21Switch to extended Nixpkg's `lib`Robert Helgesson1-8/+5
This change makes use of the `extend` function inside `lib` to inject a new `hm` field containing the Home Manager library functions. This simplifies use of the Home Manager library in the modules and reduces the risk of accidental infinite recursion. PR #994
2020-01-16home-environment: make `home.activation` publicRobert Helgesson1-6/+40
Also improve documentation and add an example.
2020-01-16home-environment: use DAG type in `activation` optionRobert Helgesson1-1/+2
2019-09-05keyboard: make the `model` option optionalRobert Helgesson1-2/+2
Also, actually use it in the call to setxkbmap.
2019-09-05keyboard: make `layout` and `variant` optionalRobert Helgesson1-6/+22
Also default these options to `null` for state version ā‰„ 19.09. Fixes #811 Suggested-by: Sean Marshallsay <srm.1708@gmail.com>
2019-08-22Replace use of `stdenv.shell` by `runtimeShell`Robert Helgesson1-1/+1
2019-04-27Fix type of various `sessionVariables` optionsRobert Helgesson1-9/+9
Unfortunately, using `attrsOf` is not possible since it results in too eager evaluation. In particular, the home.sessionVariables = { FOO = "Hello"; BAR = "${config.home.sessionVariables.FOO} World!"; }; example will cause an infinite recursion. This commit restores the option type of - `home.sessionVariables`, - `pam.sessionVariables`, - `programs.bash.sessionVariables`, and - `programs.zsh.sessionVariables` to `attrs`. It also adds test cases for the above options to avoid regressions. Fixes #659
2019-04-11home-environment: make `home.keyboard` optionalRobert Helgesson1-2/+5
When set to `null` then the `xsession` module will not attempt to manage the keyboard settings.
2019-04-03home-environment: use attrsOf instead of attrsRobert Helgesson1-1/+1
2019-03-18Remove some use of `mkDerivation`Robert Helgesson1-8/+7
Instead use `runCommand`, which by default uses `stdenvNoCC` resulting in a reduced dependency footprint. Fixes #612
2019-03-06docs: add language attribute to program listingsRobert Helgesson1-2/+2
2019-02-16nixos module: support NixOS user packages installRobert Helgesson1-4/+32
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.
2018-09-14home-environment: add option `home.extraProfileCommands`Robert Helgesson1-0/+11
This _internal_ option indicates extra commands that should be run in the `postBuild` step of the profile environment build. Fixes #386
2018-07-31Avoid substitution for some derivationsRobert Helgesson1-0/+3
In particular, don't bother attempting to do substitution of the home files and home generation derivations since these rarely, if ever, could be substituted. Fixes #330
2018-07-31Parametrize path to profile directoryMalte Brandy1-0/+13
2018-02-27home-environment: use nix-env from PATHRobert Helgesson1-1/+0
It is safest to use the system install of Nix since that will be compatible with the running nix-daemon and/or databases. Also add a printout of the used Nix version in the activation script when running in verbose mode. Fixes #218.
2018-02-08Remove deprecated option `home.sessionVariableSetter`Robert Helgesson1-19/+12
2018-02-07allow Home Manager to be used as a NixOS moduleRobert Helgesson1-0/+1
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-01-08home-environment: deprecate option `home.sessionVariableSetter`Robert Helgesson1-2/+5
2018-01-07home-environment: install `hm-session-vars.sh` fileRobert Helgesson1-0/+17
This is a file containing all session variables exported using a Bourne-compatible syntax.
2018-01-07home-environment: describe session variable values a bitRobert Helgesson1-0/+9
2018-01-07home-environment: describe session variable trickynessRobert Helgesson1-0/+19
2018-01-05home-environment: run activation script in $HOMERobert Helgesson1-0/+2
This avoids issues when starting the activation script somewhere inaccessible.
2018-01-05home-environment: minor code simplificationRobert Helgesson1-2/+1
2017-12-26Add dag library to `config.lib`Robert Helgesson1-4/+5
Also replace all imports of `dag.nix` by the entry in `config.lib`.
2017-12-13home-environment: make username and home directory writableRobert Helgesson1-4/+2
In certain cases it makes sense to override the target username and home directory. In particular, if you're building a configuration for a remote profile.
2017-12-11home-environment: optionally empty PATH in activationRobert Helgesson1-2/+14
This adds the option `home.emptyActivationPath` that, when enabled, will cause the activation script to ignore the calling user's `PATH`. The option is disabled by default to match current behavior but the intent is to change this in the future to reduce risk of accidental dependencies of the environment.
2017-11-06use `buildCommand` for single phase buildsCornelius Mika1-3/+1
2017-11-06home-environment: clean up activation script creationCornelius Mika1-2/+4
2017-10-21home-environment: add extraBuilderCommands optionSilvan Mosberger1-0/+11
2017-10-20Use only tools from Nixpkgs in activation scriptRobert Helgesson1-0/+6
Note, we still pull in the user's `PATH` in case the user has defined their own activation blocks that depend on additional tools. Eventually this will be deprecated and removed. See #99.
2017-10-19home-environment: use makeBinPath for activation PATHRobert Helgesson1-4/+8
2017-10-15home-environment: add username and homeDirectory optionsSilvan Mosberger1-0/+28
2017-10-15Separate home files module from home-environment.nixSilvan Mosberger1-216/+1
2017-10-15home-environment: add option `home.extraOutputsToInstall`Robert Helgesson1-0/+12
2017-09-26Mark rycee as maintainer for a bunch of modulesRobert Helgesson1-0/+2
2017-09-21lib: make dag.nix take `lib` as argumentRobert Helgesson1-1/+1
2017-09-13home-environment: fail if a home.file is outside $HOMERobert Helgesson1-2/+10
2017-08-27home-environment: include home path in generation directoryRobert Helgesson1-0/+1
Technically not necessary but it was a bit silly to leave out this important directory from the generation directory. This also makes it more convenient to browse the installed packages after a `home-managerĀ build`.
2017-08-22home-environment: use relative latest profile linkRichard Yang1-1/+1
Using a relative path prevents the latest version from being garbage collected.
2017-08-21home-environment: replace superfluous spaces in debug messagesCornelius Mika1-2/+2
2017-08-21home-environment: only notify about path deletion on verbose outputCornelius Mika1-1/+1
2017-08-21home-environment: fix error when deleting empty directoriesCornelius Mika1-6/+10
With --ignore-fail-on-non-empty, non-emptiness is the only failure that gets ignored by rmdir. In the case that rmdir reaches $HOME and considers deleting it, it will detect insufficient permissions and subsequently exit with an error, even if $HOME is not empty. Prevent this by calling rmdir with a relative path that excludes $HOME.
2017-08-16zsh: add moduleNikita Uvarov1-1/+1
2017-07-22home-environment: fix cleanup of user replaced directoriesRobert Helgesson1-1/+1
We must only follow the symbolic link once (i.e., not use the `-e` option) since otherwise the pattern will not match when `home.file.xyz.source` is a directory.