Problems wit Nix-Colors and impure config

So basically, i dont know why, but i get an error trying to use nix-colors with colorSchemeFromPicture

 ~/D/nix-config 󰥓 home-manager --flake .#aurel@nixos switch --impure
warning: Git tree '/home/aurel/Documents/nix-config' is dirty
error: undefined variable 'nix-colors'

       at /nix/store/ny7bacz3r5vpf69y98dg0ibsax6nxazi-source/home-manager/colorScheme.nix:29:24:

           28|     let
           29|       nix-colors-lib = nix-colors.lib.contrib { inherit pkgs; };
             |                        ^
           30|     in {

and i dont know why, you can check my config in github :

  • i cant manage to have a pure config because when im doing ./path/to/file it doesnt work
  1. The config you have pushed to GitHub should have a different error. You’ve used nixcolors in some places and nix-colors in others. Your colorScheme.nix has a function parameter named nixcolors, which you’re not passing to it.
  2. It seems odd that you pass inputs, and pass nix-colors by itself, specifically.

i cant manage to have a pure config because when im doing ./path/to/file it doesnt work

“it doesn’t work” how?

Sorry for the fact that im blind, so i corrected itand it works, but what do you suggest other than passing nix-colors. And like you can see that lf.nix works when it is ./lf.nix in inputs but my dwm src in configuration.nix dont input the files when in ./path/to/file

im getting :

error: getting status of '/nix/store/fvilnylnr60i6h524fplzhhhhasp03il-source/nixos/dwm': No such file or directory
(use '--show-trace' to show detailed location information)

And i wanted to know if there was a way to get the path of the nixos config folder in bash so i can put the current wallpaper on my folder and get it with a not absolute path in colorSchemes.nix so lf can put it when i change the wallpaper

  1. Instead of passing in nix-colors, you can instead have colorScheme.nix accept inputs, and then use inputs.nix-colors. I tend to prefer this, and it’s actually what I use everywhere, rather than re-numerating the inputs names in the flake, right after they were specified.

  2. Flakes requires files be part of the git repo, but it looks like dwm is maybe a symlink outside your nix-config repo.

DWM is part of the repo and not a symlink so i dont know why it wont work

That’s not what it looks like on GitHub: https://github.com/aurreland/nix-config/tree/master/nixos

1 Like

My bad i hadnt seen it, it works well now.
And is there a way througha command or i dont know to get the current path of nix config folder