Home Manager: Difference between revisions

update example to 24.11
NobbZ (talk | contribs)
Removed options that are not only not needed for HM as system module, but might be harmful when used (wrong)
 
(3 intermediate revisions by 3 users not shown)
Line 60: Line 60:
     home-manager = {
     home-manager = {
       url = "github:nix-community/home-manager/release-24.11";
       url = "github:nix-community/home-manager/release-24.11";
       inputs.nixpkgs.follows = "nixpkgs"
       inputs.nixpkgs.follows = "nixpkgs";
     };
     };
   };
   };
Line 67: Line 67:
       system = "x86_64-linux";
       system = "x86_64-linux";
       modules = [
       modules = [
          ./configuration.nix
        ./configuration.nix
          home-manager.nixosModules.home-manager
        home-manager.nixosModules.home-manager
          {
        {
            home-manager.useGlobalPkgs = true;
          home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
          home-manager.useUserPackages = true;
            home-manager.users.your-username = import ./home.nix;
          home-manager.users.your-username = import ./home.nix;
         };
         }
       ];
       ];
     };
     };
Line 85: Line 85:


{
{
  # Home Manager needs a bit of information about you and the
  # paths it should manage.
  home.username = "your-username";
  home.homeDirectory = "/home/your-username";
   # This value determines the Home Manager release that your
   # This value determines the Home Manager release that your
   # configuration is compatible with. This helps avoid breakage
   # configuration is compatible with. This helps avoid breakage
Line 98: Line 93:
   # the Home Manager release notes for a list of state version
   # the Home Manager release notes for a list of state version
   # changes in each release.
   # changes in each release.
   home.stateVersion = "24.05";
   home.stateVersion = "24.11";
 
  # Let Home Manager install and manage itself.
  programs.home-manager.enable = true;
}
}
</syntaxhighlight>
</syntaxhighlight>