Hello all,
New to nixOS, I’ve been trying to put together a bare minimum flakes and home-manager as a flakes module configuration, but I got a couple of errors:
error: The 'homeManagerConfiguration' arguments
- 'configuration',
- 'username',
- 'homeDirectory'
- 'stateVersion',
- 'extraModules', and
- 'system'
have been removed. Instead use the arguments 'pkgs' and
'modules'. See the 22.11 release notes for more.
I went to the release notes and modified my flake.nix, but now I am getting another error:
error: flake 'path:/home/leigh/.flake' does not provide attribute 'packages.x86...
Did you mean homeManagerConfiguration?
I have my configuration.nix and hardware-configuration.nix copied to a sub-folder, and I have a starter home.nix in my config folder in the home directory. Here’s my flake.nix. (The description is ironic given my current predicament.) If anyone has a word of advice, I’d be grateful. Thanks.
{
description = "Easy does it";
inputs = {
# Specify the source of Home Manager and Nixpkgs.
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
in {
nixosConfigurations = {
nixbox = lib.nixosSystem {
inherit system;
modules = [
./system/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.leigh = import ./home.nix;
}
];
};
};
};
}