1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

Switch stable branch to release-23.05

This commit is contained in:
Robert Helgesson 2023-05-31 18:32:04 +02:00
parent b2a6cf7b59
commit 33ccc5c285
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
8 changed files with 28 additions and 118 deletions

View file

@ -10,7 +10,7 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "release-22.11"
target-branch: "release-23.05"
schedule:
interval: "weekly"
commit-message:

View file

@ -28,7 +28,7 @@ Home Manager is developed against `nixpkgs-unstable` branch, which
often causes it to contain tweaks for changes/packages not yet
released in stable NixOS. To avoid breaking users' configurations,
Home Manager is released in branches corresponding to NixOS releases
(e.g. `release-22.11`). These branches get fixes, but usually not new
(e.g. `release-23.05`). These branches get fixes, but usually not new
modules. If you need a module to be backported, then feel free to open
an issue.
@ -53,7 +53,7 @@ will write to your dconf store and cannot tell whether a configuration
that it is about to be overwritten was from a previous Home Manager
generation or from manual configuration.
Home Manager targets [NixOS][] unstable and NixOS version 22.11 (the
Home Manager targets [NixOS][] unstable and NixOS version 23.05 (the
current stable version), it may or may not work on other Linux
distributions and NixOS versions.

View file

@ -58,11 +58,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
$ nix-channel --update
----
+
and if you follow a Nixpkgs version 22.11 channel you can run
and if you follow a Nixpkgs version 23.05 channel you can run
+
[source,console]
----
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ nix-channel --update
----
@ -130,11 +130,11 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
$ sudo nix-channel --update
----
and if you follow a Nixpkgs version 22.11 channel, you can run
and if you follow a Nixpkgs version 23.05 channel, you can run
[source,console]
----
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
$ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ sudo nix-channel --update
----
@ -241,11 +241,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
$ nix-channel --update
----
and if you follow a Nixpkgs version 22.11 channel, you can run
and if you follow a Nixpkgs version 23.05 channel, you can run
[source,console]
----
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-22.11.tar.gz home-manager
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz home-manager
$ nix-channel --update
----

View file

@ -70,24 +70,20 @@ writing a Home Manager configuration.
[[sec-flakes-standalone]]
=== Standalone setup
The installation procedure for the standalone version of Home Manager
is currently different for the unstable and stable branch.
Therefore, if you are tracking the Nixpkgs or NixOS unstable please go to
<<sec-flakes-standalone-unstable>>,
and if you track Nixpkgs or NixOS version 22.11 please go to
<<sec-flakes-standalone-stable>>.
[[sec-flakes-standalone-unstable]]
==== Unstable Version
To prepare an initial Home Manager configuration for your logged in user,
you can run the Home Manager `init` command directly from its flake.
For example, to generate and activate a basic configuration run the command
For example, if you are using the unstable version of Nixpkgs or NixOS,
then to generate and activate a basic configuration run the command
[source,console]
$ nix run home-manager/master -- init --switch
For Nixpkgs or NixOS version 23.05 run
[source,console]
$ nix run home-manager/release-23.05 -- init --switch
This will generate a `flake.nix` and a `home.nix` file in
`~/.config/home-manager`, creating the directory if it does not exist.
@ -96,11 +92,13 @@ This is useful if you want to inspect and edit the configuration before activati
[source,console]
----
$ nix run home-manager/master -- init
$ nix run home-manager/$branch -- init
$ # Edit files in ~/.config/home-manager
$ nix run home-manager/master -- init --switch
$ nix run home-manager/$branch -- init --switch
----
Where `$branch` is one of `master` or `release-23.05`.
After the initial activation has completed successfully then building
and activating your flake-based configuration is as simple as
@ -112,7 +110,7 @@ For example,
[source,console]
----
$ nix run home-manager/master -- init --switch ~/hmconf
$ nix run home-manager/$branch -- init --switch ~/hmconf
$ # And after the initial activation.
$ home-manager switch --flake ~/hmconf
----
@ -132,94 +130,6 @@ and these options will be forwarded to `nix build`.
See the {nixos-wiki-flakes}[NixOS Wiki page] for details.
====
[[sec-flakes-standalone-stable]]
==== Version 22.11
1. Set up a flake with a `flake.nix` as follows:
+
[source,nix]
----
{
description = "Home Manager configuration of Jane Doe";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
home-manager = {
url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations.jdoe = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
};
};
}
----
+
[NOTE]
====
* The Home Manager library is exported by the flake under `lib.hm`.
* You can use the above `flake.nix` as a template in `~/.config/home-manager` by
+
[source,console]
$ nix flake new ~/.config/home-manager -t github:nix-community/home-manager
====
2. Install Home Manager and apply the configuration by
+
[source,console]
$ nix run <flake-uri>#homeConfigurations.jdoe.activationPackage
+
Substitute `<flake-uri>` with the flake URI of the configuration flake.
If `flake.nix` resides in `~/.config/home-manager`,
`<flake-uri>` may be `~/.config/home-manager`
as a Git tree or `path:~/.config/home-manager` if not.
3. Since the release `21.05`,
building a flake-based configuration is as simple as
+
[source,console]
$ home-manager switch --flake '<flake-uri>#jdoe'
+
once home-manager is installed.
+
Here, `jdoe` is a configuration specified in the flake file,
and `<flake-uri>#jdoe` will be expanded to
`<flake-uri>#homeConfigurations.jdoe.activationPackage`
and be built by Nix.
[NOTE]
====
The flake inputs are not upgraded automatically when switching.
The analogy to the command `home-manager --update ...` is `nix flake update`.
If updating more than one input is undesirable,
the command `nix flake lock --update-input <input-name>` can be used.
You can also pass flake-related options
such as `--recreate-lock-file` or `--update-input [input]`
to `home-manager` when building/switching,
and these options will be forwarded to `nix build`.
See the {nixos-wiki-flakes}[NixOS Wiki page] for detail.
====
[[sec-flakes-nixos-module]]
=== NixOS module

View file

@ -1,7 +1,7 @@
[[sec-release-22.11]]
== Release 22.11
This is the current unstable branch and the information in this section is therefore not final.
The 22.11 release branch became the stable branch in November, 2022.
[[sec-release-22.11-highlights]]
=== Highlights

View file

@ -1,7 +1,7 @@
[[sec-release-23.05]]
== Release 23.05
This is the current unstable branch and the information in this section is therefore not final.
The 23.05 release branch became the stable branch in May, 2023.
[[sec-release-23.05-highlights]]
=== Highlights
@ -36,7 +36,7 @@ and optionally also activate it.
The recommended installation method for a standalone Home Manager setup
with Nix flakes uses this new command.
The standard installation method remains the same but uses the new command internally.
See <<sec-flakes-standalone-unstable>> for more.
See <<sec-flakes-standalone>> for more.
[[sec-release-23.05-state-version-changes]]
=== State Version Changes

View file

@ -59,7 +59,7 @@ A fresh install of Home Manager will generate a minimal `~/.config/home-manager/
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.11";
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
@ -99,7 +99,7 @@ To satisfy the above setup we should elaborate the `home.nix` file as follows:
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.11";
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

View file

@ -316,7 +316,7 @@ $xdgVars
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "22.11"; # Please read the comment before changing.
home.stateVersion = "23.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
@ -961,7 +961,7 @@ while [[ $# -gt 0 ]]; do
export VERBOSE=1
;;
--version)
echo 23.05-pre
echo 23.05
exit 0
;;
*)