saviam
November 18, 2024, 10:52am
1
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.
and that
then, I add that to my home.nix in /Flake/hosts/
And for the and I add in my kitty file that:
Thanks you !
matt
November 18, 2024, 11:43am
2
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.
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.
saviam
November 18, 2024, 4:33pm
5
What is HM ? I don’t know developpe in nixlang.
saviam
November 18, 2024, 6:49pm
7
I use home manager and nixosModules in my Flake
saviam
November 22, 2024, 10:50am
8
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
saviam
November 22, 2024, 5:50pm
11
What is the diffirence between standalone HM or not ? I change foo@bar with my username.
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
];
};
Okay, what’s the exact command you’re running to rebuild your config?
saviam
November 22, 2024, 8:41pm
16
sudo nixos-rebuild switch --flake ~/Flake
Then delete the homeConfigurations
stuff and share your config.
Text not screenshots.
saviam
November 22, 2024, 8:53pm
18
{
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?
saviam
November 22, 2024, 9:20pm
20
It’s not in one file, I use flake.