this post was submitted on 14 Nov 2023
4 points (100.0% liked)
NixOS
930 readers
1 users here now
NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels of stability and size.
This community discusses NixOS, Nix, and everything related.
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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 myflake.nix
(if you have a different setup, this might not be necessary or you have to do it in a slightly different way):Now the home-manager config (in my case
home.nix
) can look like this: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:rc2nix > old-config.nix
rc2nix > new-config.nix
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.
Thank you for help. so now I have flake.nix and home.nix in ~/.config/home-manager. flake.nix looks like
`{ description = "Plasma Manager Example";
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 , plasma-manager , nixpkgs , ... }: let system = "x86_64-linux"; username = "naresh"; in { homeConfigurations.${username} = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; # extraModules = [ # plasma-manager.homeManagerModules.plasma-manager # ];
} `
and home.nix looks like
and when I run
home-manager switch --flake ~/.config/home-manager/
It gives me`error: … while evaluating a branch condition
`
Now don't know what to do. I got your latter advice regarding diff but first I need to make this work. I am on unstable nixos version. and
home-manager --version gives 23.11-pre
nixos-version gives 23.11pre546599.e44462d6021b (Tapir)
___``___
The problem seems to be that
home.stateVersion
is not set because you commented out both the declaration inflake.nix
as well as the line that importshome.nix
. It's a bit difficult to see whether the config is otherwise fine since there is a lot of visual clutter due to all the commented-out lines.