flake: remove superfluous arguments
Remove `stateVersion`, `username`, and `homeDirectory` as they can be set in the configuration directly. Together with the previous commit, this makes setting `stateVersion` explicitly mandatory. Also replace `configuration` by `modules`, which expects a list of Home Manager modules. Also remove `system` which was made useless by #3028.
This commit is contained in:
parent
e0baf8ee0c
commit
f26946858e
3 changed files with 100 additions and 30 deletions
|
|
@ -18,6 +18,63 @@ home.stateVersion = "18.09";
|
|||
+
|
||||
to your configuration.
|
||||
|
||||
* The Flake function `homeManagerConfiguration` has been simplified.
|
||||
Specifically, the arguments
|
||||
+
|
||||
--
|
||||
- `configuration`,
|
||||
- `username`,
|
||||
- `homeDirectory`,
|
||||
- `stateVersion`,
|
||||
- `extraModules`, and
|
||||
- `system`
|
||||
--
|
||||
+
|
||||
have been removed. Instead use the new `modules` argument, which
|
||||
accepts a list of NixOS modules.
|
||||
+
|
||||
Further, the `pkgs` argument is now mandatory and should be set to
|
||||
`nixpkgs.legacyPackages.${system}` where `nixpkgs` is the Nixpkgs
|
||||
input of your choice.
|
||||
+
|
||||
For example, if your Flake currently contains
|
||||
+
|
||||
[source,nix]
|
||||
----
|
||||
homeManagerConfiguration {
|
||||
configuration = import ./home.nix;
|
||||
system = "x86_64-linux";
|
||||
username = "jdoe";
|
||||
homeDirectory = "/home/jdoe";
|
||||
stateVersion = "22.05";
|
||||
extraModules = [ ./some-extra-module.nix ];
|
||||
}
|
||||
----
|
||||
+
|
||||
then you can change it to
|
||||
+
|
||||
[source,nix]
|
||||
----
|
||||
homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
modules = [
|
||||
./home.nix
|
||||
./some-extra-module.nix
|
||||
{
|
||||
home = {
|
||||
username = "jdoe";
|
||||
homeDirectory = "/home/jdoe";
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
----
|
||||
+
|
||||
Of course, you can move the assignment of <<opt-home.username>>,
|
||||
<<opt-home.homeDirectory>>, and <<opt-home.stateVersion>> to some
|
||||
other file or simply place them in your `home.nix`.
|
||||
|
||||
[[sec-release-22.11-state-version-changes]]
|
||||
=== State Version Changes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue