Enabling Plasma-manager errors with "option 'home' doesn't exist"
I am facing the above issue and I am new to NixOS.
I am using home-manager directly from configuration.nix, e.g. I had
/etc/nixos/configuration.nix:
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
<home-manager/nixos>
];
...
home-manager.users.xxx = ...;
I've tried adding plasma-manager/modules like this:
/etc/nixos/configuration.nix:
imports =
[ # Include the results of the hardware scan.
/etc/nixos/hardware-configuration.nix
<home-manager/nixos>
# see https://github.com/nix-community/plasma-manager/blob/trunk/examples/homeManager/home.nix
<plasma-manager/modules>
];
I got:
error: The option `home' does not exist. Definition values:
- In `/nix/var/nix/profiles/per-user/root/channels/plasma-manager/modules/apps/okular.nix':
Plasma-manager module should be imported inside home-manager, and not nixos
You need to import plasma-manager into Home-Manager's NixOS module like this
home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ];
Or you could import it inside your user configuration by just using the imports.
So basically:
{
home-manager.sharedModules = [ <plasma-manager/modules> ];
}
or
{
home-manager.users.your-user = {
imports = [ <plasma-manager/modules> ];
};
}
Hello,
I'm a newbie but I'm probably miss something. I do not use flakes. I get the same error with my configuration. It is the global configuration of nixos.
/etc/nixos/home-manager.nix:
{ config, pkgs, ... }:
let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-25.11.tar.gz";
plasma-manager = builtins.fetchTarball "https://github.com/nix-community/plasma-manager/archive/trunk.tar.gz";
in
{
imports = [
(import "${home-manager}/nixos")
(import "${plasma-manager}/modules")
./home/myuser.nix
];
home-manager.sharedModules = [ <plasma-manager/modules> ];
}
/etc/nixos/home/myuser.nix:
{ config, pkgs, ... }:
{
home-manager.users.myuser = { pkgs, ... }: {
home.stateVersion = "25.05";
home.username = "myuser";
home.homeDirectory = "/home/myuser";
programs.plasma = {
enable = true;
overrideConfig = true;
input.keyboard.layouts = [
{ layout = "fr"; }
{ layout = "fr"; variant = "mac"; }
];
};
};
}
I don't think you need to be using import inside imports, and also remove the plasma-manager import from nixos and it should work just fine