First, you need to pass the plasma-manager
input to your home-manager config in some way. I use the NixOS module for home-manager which I declare like this in my flake.nix
(if you have a different setup, this might not be necessary or you have to do it in a slightly different way):
homeManagerModule = {
imports = [home-manager.nixosModules.home-manager];
home-manager.users.myusername = import ./home.nix;
# This will give us access to the inputs in the home-manager config
home-manager.extraSpecialArgs = {inherit inputs};
};
Now the home-manager config (in my case home.nix
) can look like this:
{
inputs,
...
}: {
imports = [inputs.plasma-manager.homeManagerModules.plasma-manager];
programs.plasma = {
enable = true;
# ...
}
You probably forgot to import the plasma-manager module into home-manager. If you want to have a cleaner setup, I'd also recommend against just copying the complete output of rc2nix
into your config since it tends to contain a lot of unnecessary stuff. What I usually do is:
- Store the current config in a file, i.e.
rc2nix > old-config.nix
- Make whatever changes I want in Plasma in the graphical settings app
- Store the updated config in a new file, i.e.
rc2nix > new-config.nix
- Get the difference, i.e.
diff old-config.nix new-config.nix
and add what I want to my actual plasma-manager config.
This of course only works if you're starting from a relatively unmodified installation of KDE, but in that case it's worth the effort imo.