mirror of
https://github.com/nix-community/home-manager
synced 2024-12-21 09:19:47 +01:00
Switch stable branch to release-23.05
This commit is contained in:
parent
b2a6cf7b59
commit
33ccc5c285
8 changed files with 28 additions and 118 deletions
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
|
@ -10,7 +10,7 @@ updates:
|
||||||
|
|
||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
target-branch: "release-22.11"
|
target-branch: "release-23.05"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "weekly"
|
interval: "weekly"
|
||||||
commit-message:
|
commit-message:
|
||||||
|
|
|
@ -28,7 +28,7 @@ Home Manager is developed against `nixpkgs-unstable` branch, which
|
||||||
often causes it to contain tweaks for changes/packages not yet
|
often causes it to contain tweaks for changes/packages not yet
|
||||||
released in stable NixOS. To avoid breaking users' configurations,
|
released in stable NixOS. To avoid breaking users' configurations,
|
||||||
Home Manager is released in branches corresponding to NixOS releases
|
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
|
modules. If you need a module to be backported, then feel free to open
|
||||||
an issue.
|
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
|
that it is about to be overwritten was from a previous Home Manager
|
||||||
generation or from manual configuration.
|
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
|
current stable version), it may or may not work on other Linux
|
||||||
distributions and NixOS versions.
|
distributions and NixOS versions.
|
||||||
|
|
||||||
|
|
|
@ -58,11 +58,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
||||||
$ nix-channel --update
|
$ 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]
|
[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
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -130,11 +130,11 @@ $ sudo nix-channel --add https://github.com/nix-community/home-manager/archive/m
|
||||||
$ sudo nix-channel --update
|
$ 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]
|
[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
|
$ sudo nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@ -241,11 +241,11 @@ $ nix-channel --add https://github.com/nix-community/home-manager/archive/master
|
||||||
$ nix-channel --update
|
$ 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]
|
[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
|
$ nix-channel --update
|
||||||
----
|
----
|
||||||
|
|
||||||
|
|
|
@ -70,24 +70,20 @@ writing a Home Manager configuration.
|
||||||
[[sec-flakes-standalone]]
|
[[sec-flakes-standalone]]
|
||||||
=== Standalone setup
|
=== 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,
|
To prepare an initial Home Manager configuration for your logged in user,
|
||||||
you can run the Home Manager `init` command directly from its flake.
|
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]
|
[source,console]
|
||||||
$ nix run home-manager/master -- init --switch
|
$ 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
|
This will generate a `flake.nix` and a `home.nix` file in
|
||||||
`~/.config/home-manager`, creating the directory if it does not exist.
|
`~/.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]
|
[source,console]
|
||||||
----
|
----
|
||||||
$ nix run home-manager/master -- init
|
$ nix run home-manager/$branch -- init
|
||||||
$ # Edit files in ~/.config/home-manager
|
$ # 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
|
After the initial activation has completed successfully then building
|
||||||
and activating your flake-based configuration is as simple as
|
and activating your flake-based configuration is as simple as
|
||||||
|
|
||||||
|
@ -112,7 +110,7 @@ For example,
|
||||||
|
|
||||||
[source,console]
|
[source,console]
|
||||||
----
|
----
|
||||||
$ nix run home-manager/master -- init --switch ~/hmconf
|
$ nix run home-manager/$branch -- init --switch ~/hmconf
|
||||||
$ # And after the initial activation.
|
$ # And after the initial activation.
|
||||||
$ home-manager switch --flake ~/hmconf
|
$ 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.
|
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]]
|
[[sec-flakes-nixos-module]]
|
||||||
=== NixOS module
|
=== NixOS module
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[[sec-release-22.11]]
|
[[sec-release-22.11]]
|
||||||
== 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]]
|
[[sec-release-22.11-highlights]]
|
||||||
=== Highlights
|
=== Highlights
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[[sec-release-23.05]]
|
[[sec-release-23.05]]
|
||||||
== 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]]
|
[[sec-release-23.05-highlights]]
|
||||||
=== Highlights
|
=== Highlights
|
||||||
|
@ -36,7 +36,7 @@ and optionally also activate it.
|
||||||
The recommended installation method for a standalone Home Manager setup
|
The recommended installation method for a standalone Home Manager setup
|
||||||
with Nix flakes uses this new command.
|
with Nix flakes uses this new command.
|
||||||
The standard installation method remains the same but uses the new command internally.
|
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]]
|
[[sec-release-23.05-state-version-changes]]
|
||||||
=== State Version Changes
|
=== State Version Changes
|
||||||
|
|
|
@ -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
|
# You can update Home Manager without changing this value. See
|
||||||
# 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 = "22.11";
|
home.stateVersion = "23.05";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
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
|
# You can update Home Manager without changing this value. See
|
||||||
# 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 = "22.11";
|
home.stateVersion = "23.05";
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
|
@ -316,7 +316,7 @@ $xdgVars
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# 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
|
# want to update the value, then make sure to first check the Home Manager
|
||||||
# release notes.
|
# 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
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
@ -961,7 +961,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
export VERBOSE=1
|
export VERBOSE=1
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
echo 23.05-pre
|
echo 23.05
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue