I’ve been struggling to update my flake.nix for home-manager to use 22.11. It is complaining about not being called with the required argument “pkgs”. I’m trying to update my file based on the README, which starts with:
Thats only the relevant part, namey the homeManagerConfiguration call. You replace your current call with that snippet, the inputs remain where they are.
I’ve looked at the changelog, but I don’t see where system comes from. In the old version, it is specified explicitly, but the “change it to” version only mentions system when specifying pkgs. If I remove the system=... line, I get an undefined variable error. If I put it right before pkgs=..., I get an error for using an obsolete argument.
Finally got it–thanks for all your help. For the record, here’s what I’ve ended up with:
description = "Home Manager configuration of Mike Gauland";
inputs = {
# Specify the source of Home Manager and Nixpkgs
home-manager.url = "github:nix-community/home-manager";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { home-manager,
blender-bin,
nixpkgs,
... }:
let
system = "x86_64-linux";
username = "mike";
in {
homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
modules = [
./home.nix
./dunst.nix
./xscreensaver.nix
{
nixpkgs.overlays = [blender-bin.overlays.default];
home = {
inherit username;
homeDirectory = "/home/${username}";
# Update the state version as needed.
stateVersion = "22.05";
};
}
];
};
};
}```
Final changes were to remove `system` from the `home = {...}` block, and move `stateVersion=...` into it.