From 785ca6121b0e3e46940de7e67cfc44ca05b00a0d Mon Sep 17 00:00:00 2001 From: rycee Date: Sat, 4 Sep 2021 21:14:17 +0000 Subject: [PATCH] deploy: 2952168ed59aa369a560563de2e00eab19f42d1b --- index.html | 12 +++++++----- tools.html | 14 +++++++------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 7e5629de7..10a965536 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ -Home Manager Manual

Home Manager Manual


Preface
1. Installing Home Manager
1.1. Standalone installation
1.2. NixOS module
1.3. nix-darwin module
2. Writing Home Manager Modules
2.1. Option Types
3. Contributing
3.1. Getting started
3.2. Guidelines
3.2.1. Maintain backward compatibility
3.2.2. Keep forward compatibility in mind
3.2.3. Add only valuable options
3.2.4. Add relevant tests
3.2.5. Add relevant documentation
3.2.6. Add yourself as a module maintainer
3.2.7. Format your code
3.2.8. Format your commit messages
3.2.9. Format your news entries
3.2.10. Use conditional modules and news
3.2.11. Mind the license
3.3. Commits
3.4. Code Style
3.5. News
3.6. Tests
4. Frequently Asked Questions (FAQ)
4.1. Why is there a collision error when switching generation?
4.2. Why are the session variables not set?
4.3. How to set up a configuration for multiple users/machines?
4.4. Why do I get an error message about ca.desrt.dconf?
4.5. How do I install packages from Nixpkgs unstable?
4.6. How do I override the package used by a module?
A. Configuration Options
B. NixOS Module Options
C. nix-darwin Module Options
D. Tools
home-manager - — reconfigure a user environment
E. Release Notes
E.1. Release 21.11
E.1.1. Highlights
E.1.2. State Version Changes
E.2. Release 21.05
E.2.1. Highlights
E.2.2. State Version Changes
E.3. Release 20.09
E.3.1. Highlights
E.3.2. State Version Changes
E.4. Release 20.03
E.4.1. Highlights
E.4.2. State Version Changes
E.5. Release 19.09
E.5.1. Highlights
E.5.2. State Version Changes
E.6. Release 19.03
E.6.1. Highlights
E.6.2. State Version Changes
E.7. Release 18.09

Preface

+Home Manager Manual

Home Manager Manual


Preface
1. Installing Home Manager
1.1. Standalone installation
1.2. NixOS module
1.3. nix-darwin module
2. Writing Home Manager Modules
2.1. Option Types
3. Contributing
3.1. Getting started
3.2. Guidelines
3.2.1. Maintain backward compatibility
3.2.2. Keep forward compatibility in mind
3.2.3. Add only valuable options
3.2.4. Add relevant tests
3.2.5. Add relevant documentation
3.2.6. Add yourself as a module maintainer
3.2.7. Format your code
3.2.8. Format your commit messages
3.2.9. Format your news entries
3.2.10. Use conditional modules and news
3.2.11. Mind the license
3.3. Commits
3.4. Code Style
3.5. News
3.6. Tests
4. Frequently Asked Questions (FAQ)
4.1. Why is there a collision error when switching generation?
4.2. Why are the session variables not set?
4.3. How to set up a configuration for multiple users/machines?
4.4. Why do I get an error message about ca.desrt.dconf?
4.5. How do I install packages from Nixpkgs unstable?
4.6. How do I override the package used by a module?
A. Configuration Options
B. NixOS Module Options
C. nix-darwin Module Options
D. Tools
home-manager + — reconfigure a user environment
E. Release Notes
E.1. Release 21.11
E.1.1. Highlights
E.1.2. State Version Changes
E.2. Release 21.05
E.2.1. Highlights
E.2.2. State Version Changes
E.3. Release 20.09
E.3.1. Highlights
E.3.2. State Version Changes
E.4. Release 20.03
E.4.1. Highlights
E.4.2. State Version Changes
E.5. Release 19.09
E.5.1. Highlights
E.5.2. State Version Changes
E.6. Release 19.03
E.6.1. Highlights
E.6.2. State Version Changes
E.7. Release 18.09

Preface

This manual will eventually describe how to install, use, and extend Home Manager.

@@ -55,9 +55,11 @@ Manager generation: user environment.

  • If you do not plan on having Home Manager manage your shell configuration then you must source the -

    $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh

    file in your shell configuration. Alternatively source

    /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh

    when managing home configuration together with system configuration.

    Unfortunately, we currently only support POSIX.2-like shells such as +

    $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh

    file in your shell configuration. Alternatively source

    /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh

    when managing home configuration together with system configuration.

    This file can be sourced directly by POSIX.2-like shells such as Bash or -Z shell.

    For example, if you use Bash then add

    . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

    to your ~/.profile file.

  • If instead of using channels you want to run Home Manager from a Git +Z shell.

    For example, if you use Bash then add

    . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

    to your ~/.profile file. For fish shell, it is possible to use +foreign-env to +source the file.

    If instead of using channels you want to run Home Manager from a Git checkout of the repository then you can use the programs.home-manager.path option to specify the absolute path to the repository.

    1.2. NixOS module

    Home Manager provides a NixOS module that allows you to prepare user @@ -281,7 +283,7 @@ building path(s) ‘/nix/store/b5c0asjz9f06l52l9812w6k39ifr49jj-user-environment Wide character in die at /nix/store/64jc9gd2rkbgdb4yjx3nrgc91bpjj5ky-buildenv.pl line 79. collision between ‘/nix/store/fmwa4axzghz11cnln5absh31nbhs9lq1-home-manager-path/bin/hello’ and ‘/nix/store/c2wyl8b9p4afivpcz8jplc9kis8rj36d-hello-2.10/bin/hello’; use ‘nix-env --set-flag priority NUMBER PKGNAME’ to change the priority of one of the conflicting packages builder for ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed with exit code 2 -error: build of ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed

    The solution is typically to uninstall the package from the environment using nix-env --uninstall and reattempt the Home Manager generation switch.

    You could also opt to unistall all of the packages from your profile with nix-env --uninstall '*'.

    4.2. Why are the session variables not set?

    Home Manager is only able to set session variables automatically if it manages your Bash or Z shell configuration. If you don’t want to let Home Manager manage your shell then you will have to manually source the ~/.nix-profile/etc/profile.d/hm-session-vars.sh file in an appropriate way. In Bash and Z shell this can be done by adding

    . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

    to your .profile and .zshrc files, respectively. The hm-session-vars.sh file should work in most Bourne-like shells.

    4.3. How to set up a configuration for multiple users/machines?

    A typical way to prepare a repository of configurations for multiple logins and machines is to prepare one "top-level" file for each unique combination.

    For example, if you have two machines, called "kronos" and "rhea" on which you want to configure your user "jane" then you could create the files

    • +error: build of ‘/nix/store/b37x3s7pzxbasfqhaca5dqbf3pjjw0ip-user-environment.drv’ failed

      The solution is typically to uninstall the package from the environment using nix-env --uninstall and reattempt the Home Manager generation switch.

      You could also opt to unistall all of the packages from your profile with nix-env --uninstall '*'.

    4.2. Why are the session variables not set?

    Home Manager is only able to set session variables automatically if it manages your Bash, Z shell, or fish shell configuration. If you don’t want to let Home Manager manage your shell then you will have to manually source the ~/.nix-profile/etc/profile.d/hm-session-vars.sh file in an appropriate way. In Bash and Z shell this can be done by adding

    . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"

    to your .profile and .zshrc files, respectively. The hm-session-vars.sh file should work in most Bourne-like shells. For fish shell, it is possible to source it using the foreign-env plugin

    fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" > /dev/null

    4.3. How to set up a configuration for multiple users/machines?

    A typical way to prepare a repository of configurations for multiple logins and machines is to prepare one "top-level" file for each unique combination.

    For example, if you have two machines, called "kronos" and "rhea" on which you want to configure your user "jane" then you could create the files

    • kronos-jane.nix,
    • rhea-jane.nix, and diff --git a/tools.html b/tools.html index 88e72dde3..8670ac00e 100644 --- a/tools.html +++ b/tools.html @@ -1,6 +1,6 @@ -Appendix D. Tools

      Appendix D. Tools

      home-manager - — reconfigure a user environment

      Name

      home-manager +Appendix D. Tools

      Appendix D. Tools

      home-manager + — reconfigure a user environment

      Name

      home-manager — reconfigure a user environment

      Synopsis

      home-manager { build | @@ -82,7 +82,7 @@ | --verbose } - ]

      Description

      + ]

      Description

      This command updates the user environment so that it corresponds to the configuration specified in ~/.config/nixpkgs/home.nix or ~/.config/nixpkgs/flake.nix.

      @@ -151,7 +151,7 @@ available for immediate garbage collection.

    -

    Options

    +

    Options

    The tool accepts the options

    -A attrPath @@ -259,15 +259,15 @@ --verbose

    Activates verbose output. -

    Files

    +

    Files

    ~/.local/share/home-manager/news-read-ids

    Identifiers of news items that have been shown. Can be deleted to reset the read news indicator. -

    Bugs

    +

    Bugs

    Please report any bugs on the project issue tracker. -

    See also

    +

    See also

    home-configuration.nix(5)

    \ No newline at end of file