Since the 22.11 version of Nix I had some trouble with my installation. Every time i want to set it up it returns me an error in picom.nix even when I cut off the part about picom in my home.nix.
Looking in the release information I found out that I needed to take of the bracket in my file in order to get a float and not a string but this came from 22.05 and doesn’t seems to work
Here is the full error :
`error: attribute ‘numbers’ missing
at /nix/store/4asrgr13kkkjgir8pmapkz7hw13l73z4-source/modules/services/picom.nix:144:14:
143| activeOpacity = mkOption {
144| type = types.numbers.between 0 1;
| ^
145| default = 1.0;
I’m not using flake but since one of the computer I’m using his a preinstalled one with already some packages and config it can be the case. But mine also have this issue even that he is just the basic installation of nix without specific configurations.
Can you please clarify your setup from the original post?
What do you mean by the 22.11 version of “nix”? nix is currently available in version 2.11
You say “home.nix” though you are not showing any traces of home manager
You say you update “it”, what is “it” and how do you do it? what are the commands involved?
You said you had to “take of the bracket”, what bracket? Do you have a diff?
As your output didn’t provide any traces of a nixos channel, what are you running there and how do you manage the systems inputs?
The machine shows being on 22.05 from August, at the same time the only mentioned channel is labeled “unstable” which would be 22.11pre. How comes?
Is your configuration publicly available?
In one post you mention “one of the computers” and “his” computer and “mine” computer, lets focus on the one you are having trouble with. Or strictly differ in future posts what happens on “your”, “his” or any other computer.
I was saying that I’m having exactly the same trouble on two different configuration but with the same home.nix because it seems to be an important information.
I have no clue what you mean by “bracket on the floats”, just that it is not in this example. For me “bracket” means [] which denotes a list, which again doesn’t make sense when talking about floats.
That creates a nixos-unstable channel. But HM requires that there are nixpkgs and home-manager in the nix search path, aka NIX_PATH.
Your nix-info -m from above just has shown a nixpkgs but not a home-manager.
And I actually expect HM to fail with something like <home-manager> not found when not having the home-manager channel/nix path entry. With other words: I do not expect it to get that far it came for you!
Can you therefore please share the output of printenv NIX_PATH and ls all of the unnamed entries?
You should reconsider this, and also switch to manage them using flakes. Makes it easier to help you debugging things, as stuff is reprodicible for us.
Of course I can understand when you do not consider either, as both imply some hurdles that are not always easily solvable.
Fwiw, my system configuration doesn’t do anything with picom, it just installs git & jq & a few other simple utils. Idk what picom is.
I’m trying to rebuild my system & user packages with:
nix build "./darwin#darwinConfigurations.darwin.system" # flake.nix is in this dir
./result/sw/bin/darwin-rebuild switch --flake "./darwin"
nix run --impure github:nix-community/home-manager -- switch --flake "$darwin"
First two steps run w/out error (but don’t seem to do anything… separate issue tho I think) then the home-manager run throws:
error: attribute 'numbers' missing
at /nix/store/wklbnx7i6cc9mwgg2h9nnq4a524nciia-source/modules/services/picom.nix:144:14:
143| activeOpacity = mkOption {
144| type = types.numbers.between 0 1;
| ^
145| default = 1.0;
(use '--show-trace' to show detailed location information)
I tried to switch back to stable nixpkgs but was getting cryptic error: unrecognised flag '--extra-experimental-features' errors so I switch back to unstable.
Thank you, that’s exactly what I needed ^^
I thought some *-darwin nixpkgs was required on mac & since */unstable-darwin wasn’t available I thought the most recent darwin one was what I wanted… but your answer gave me the courage to try the */unstable channel & it seems to be working smoothly so far, nice!
Since the versions seem to match here is the home.nix file. Its under .config/nixpkgs/home.nix and its the only file there
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "semar";
home.homeDirectory = "/home/semar";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}