this post was submitted on 14 Nov 2023
4 points (100.0% liked)
NixOS
232 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
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.