diff --git a/index.xhtml b/index.xhtml index a2a0bcde9..6803c98f9 100644 --- a/index.xhtml +++ b/index.xhtml @@ -33,7 +33,7 @@
-

Table of Contents

Preface
Introduction to Home Manager
Installing Home Manager
Standalone installation
NixOS module
nix-darwin module
Using Home Manager
Configuration Example
Rollbacks
Keeping your ~ safe from harm
Graphical services
GPU on non-NixOS systems
Updating
Nix Flakes
Prerequisites
Standalone setup
NixOS module
nix-darwin module
Writing Home Manager Modules
Option Types
Contributing
Getting started
Guidelines
News
Tests
Third-Party Tools and Extensions
Module Collections
Frequently Asked Questions (FAQ)
Why is there a collision error when switching generation?
Why are the session variables not set?
How to set up a configuration for multiple users/machines?
Why do I get an error message about ca.desrt.dconf or dconf.service?
How do I install packages from Nixpkgs unstable?
How do I change the package used by a module?
A. Home Manager Configuration Options
B. NixOS Configuration Options
C. nix-darwin Configuration Options
D. Release Notes
+

Table of Contents

Preface
Introduction to Home Manager
Installing Home Manager
Standalone installation
NixOS module
nix-darwin module
Using Home Manager
Configuration Example
Rollbacks
Keeping your ~ safe from harm
Graphical services
GPU on non-NixOS systems
Updating
Nix Flakes
Prerequisites
Standalone setup
NixOS module
nix-darwin module
flake-parts module
Writing Home Manager Modules
Option Types
Contributing
Getting started
Guidelines
News
Tests
Third-Party Tools and Extensions
Module Collections
Frequently Asked Questions (FAQ)
Why is there a collision error when switching generation?
Why are the session variables not set?
How to set up a configuration for multiple users/machines?
Why do I get an error message about ca.desrt.dconf or dconf.service?
How do I install packages from Nixpkgs unstable?
How do I change the package used by a module?
A. Home Manager Configuration Options
B. NixOS Configuration Options
C. nix-darwin Configuration Options
D. Release Notes

Preface

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

If you encounter problems then please reach out on the IRC channel #home-manager @@ -446,7 +446,7 @@ user profiles to be built together with the system when running description of this setup.

  • This allows the user profiles to be built together with the system when running darwin-rebuild. See nix-darwin module for a description of this -setup.

  • Table of Contents

    Prerequisites
    Standalone setup
    NixOS module
    nix-darwin module

    Prerequisites

    Prerequisites

    • Install Nix 2.4 or later, or have it in nix-shell.

    • Enable experimental features nix-command and flakes.

      • When using NixOS, add the following to your configuration.nix and rebuild your system.

        nix = {
           package = pkgs.nixFlakes;
           extraOptions = ''
        @@ -556,6 +556,36 @@ to that of NixOS. The flake.nix would be:

        <
         

        and it is also rebuilt with the nix-darwin generations. The rebuild command here may be darwin-rebuild switch --flake <flake-uri>.

        You can use the above flake.nix as a template in ~/.config/darwin by

        $ nix flake new ~/.config/darwin -t github:nix-community/home-manager#nix-darwin
         
        +

      flake-parts module

      When using flake-parts +you may wish to import home-manager’s flake module, +flakeModules.home-manager.

      {
      +  description = "flake-parts configuration";
      +
      +  inputs = {
      +    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
      +    home-manager.url = "github:nix-community/home-manager";
      +    home-manager.inputs.nixpkgs.follows = "nixpkgs";
      +    flake-parts.url = "github:hercules-ci/flake-parts";
      +  };
      +
      +  outputs = inputs@{ flake-parts, ... }:
      +    flake-parts.lib.mkFlake { inherit inputs; } {
      +      imports = [
      +        # Import home-manager's flake module
      +        inputs.home-manager.flakeModules.home-manager
      +      ];
      +      flake = {
      +        # Define `homeModules`, `homeConfigurations`,
      +        # `nixosConfigurations`, etc here
      +      };
      +      # See flake.parts for more features, such as `perSystem`
      +    };
      +}
      +

      The flake module defines the flake.homeModules and flake.homeConfigurations +options, allowing them to be properly merged if they are defined in multiple +modules.

      If you are only defining homeModules and/or homeConfigurations once in a +single module, flake-parts should work fine without importing +flakeModules.home-manager.

    Writing Home Manager Modules

    The module system in Home Manager is based entirely on the NixOS module system so we will here only highlight aspects that are specific for Home