Nix-colors installation Error

Welcome, do you want help me ?

I install nix-colors, and when I update my flake, result an error.

here’s how i did it:

I add the repo to my flake inputs.
2024-11-18_11-41-05

and that

then, I add that to my home.nix in /Flake/hosts/
2024-11-18_11-42-50

And for the and I add in my kitty file that:
2024-11-18_11-46-21

Thanks you !

Post your entire flake.nix. Because right now it looks like you just copies the example from nix-colors, as I’m assuming foo@bar isn’t your hostname.

flake.nix

Are you using standalone HM or HM as a NixOS module?

PS nix-colors is pointless as all it does is set _module.args, which you can just do yourself.

What is HM ? I don’t know developpe in nixlang. :sweat_smile:

HM is just home-manager.

I use home manager and nixosModules in my Flake

Ok, but how resolve my probleme ?

You are passing inputs to your NixOS modules, but only nix-colors to Home Manager.

 imports = [
   ./../homeManagerModules
-  inputs.nix-colors.homeManagerModules.default
+  nix-colors.homeManagerModules.default
 ];

Well they didn’t even answer the question, of whether they’re even using standalone HM or not, and the HM configuration is literally named foo@bar which is of course incorrect, which is why I asked in the first place if they’re using it at all

What is the diffirence between standalone HM or not ? I change foo@bar with my username.

I change in that :
2024-11-22_18-54-28

but the result is:

You need to declare where the NixOS and Home Manager configurations are located:

nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
  specialArgs = { inherit inputs; };
  # Here:
  modules = [
    ./path/to/configuration.nix
  ];
};

homeConfigurations."foo@bar" = home-manager.lib.homeManagerConfiguration {
  extraSpecialArgs = { inherit nix-colors; };
  # And here:
  modules = [
    ./path/to/home.nix
  ];
};

Same error, sorry :sweat_smile: !

Okay, what’s the exact command you’re running to rebuild your config?

sudo nixos-rebuild switch --flake ~/Flake

Then delete the homeConfigurations stuff and share your config.
Text not screenshots.

{
  description = "Nixos config flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nur.url = "github:nix-community/NUR";
    nix-colors.url = "github:misterio77/nix-colors";
  };

  outputs = { nixpkgs, home-manager, nix-colors, ... } @ inputs: {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit inputs; };
    };

    #homeManagerModules.default = ./home;
    nixosModules.default = ./hosts;
  };
}



That can’t be your config… what is the config you use to rebuild your system?

It’s not in one file, I use flake.