I am trying to get my first NixOS build with flakes and Home Manager.
Here is my relevant flake.nix session:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = { nixpkgs, home-manager, hyprland, ... }@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
lib = nixpkgs.lib;
in
{
nixosConfigurations = {
framework = lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules
modules = [
./configuration.nix
hyprland.homeManagerModules.default
{wayland.windowManager.hyprland.enable = true;}
home-manager.nixosModules.home-manager
];
};
# Home Manager stuff
homeManagerConfigurations = {
storopoli = home-manager.lib.homeManagerConfiguration {
inherit system pkgs;
username = "storopoli";
homeDirectory = "/home/storopoli";
configuration = {
imports =[
./modules/home-manager/home.nix
./modules/home-manager/keyboard.nix
./modules/home-manager/variables.nix
./modules/home-manager/packages.nix
./modules/home-manager/dotfiles.nix
./modules/home-manager/vscode.nix
];
};
};
};
};
};
}
Then my modules/home-manager/home.nix
is something like:
{ config, pkgs, ... }:
{
config = {
home.stateVersion = "22.11";
};
}
and for example ./modules/home-manager/variables.nix
:
{ config, pkgs, ... }:
{
config = {
# Session variables
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1; # Firefox Wayland
};
};
}
I am getting the following error:
error: The option 'home' does not exist. Definition values:
- in /nix/store/<something really big I cant get from my vm>-source/flake.nix:
{
_type = "if";
condition = true;
content = {
packages = [
...
This is really cryptic I have no idea what to do. Been watching a bunch of videos, and also going over documentation and topics here; but to no avail.