| 28 Dec 2021 |
| Pacman99changed room power levels. | 06:44:27 |
| 29 Dec 2021 |
Bruno | I have a nix error but have no clue what it means:
{ self, pkgs, ... }:
{
home-manager.users."${self.vars.username}".programs.alacritty = { ... };
home-manager.users."${self.vars.username}".programs.tmux.extraConfig = ''set -ga terminal-overrides ",alacritty:Tc"'';
}
And I'm getting the following nix error:
error: dynamic attribute 'sweenu' already defined at /nix/store/5vqbzfmprv06nfaawpn41kyx0shs4qzz-source/profiles/graphical/alacritty.nix:4:3 (sweenu being what self.vars.username evaluates to).
I have this error only on this file because I use self.vars.username several times, otherwise it works. I could just put everything under home-manager.users but I'd like to understand what the problem is.
Do you have an idea of what I'm doing wrong?
| 09:33:00 |
Bruno | * I have a nix error but have no clue what it means:
{ self, pkgs, ... }:
{
home-manager.users."${self.vars.username}".programs.alacritty = { ... };
home-manager.users."${self.vars.username}".programs.tmux.extraConfig = ''set -ga terminal-overrides ",alacritty:Tc"'';
}
And I'm getting the following nix error: error: dynamic attribute 'sweenu' already defined at /nix/store/5vqbzfmprv06nfaawpn41kyx0shs4qzz-source/profiles/graphical/alacritty.nix:4:3 (sweenu being what self.vars.username evaluates to).
I have this error only on this file because I use self.vars.username several times, otherwise it works. I could just put everything under home-manager.users but I'd like to understand what the problem is. Do you have an idea of what I'm doing wrong?
| 09:33:10 |
Bruno | * I have a nix error but have no clue what it means:
{ self, pkgs, ... }:
{
home-manager.users."${self.vars.username}".programs.alacritty = { ... };
home-manager.users."${self.vars.username}".programs.tmux.extraConfig = ''set -ga terminal-overrides ",alacritty:Tc"'';
}
And I'm getting the following nix error: error: dynamic attribute 'sweenu' already defined at /nix/store/5vqbzfmprv06nfaawpn41kyx0shs4qzz-source/profiles/graphical/alacritty.nix:4:3 (sweenu being what self.vars.username evaluates to).
I have this error only on this file because I use self.vars.username several times, otherwise it works. I could just put everything under home-manager.users but I'd like to understand what the problem is. Do you have an idea of what I'm doing wrong?
| 09:33:17 |
Bruno | In my flake.nix's outputs I have vars = import ./vars.nix; and vars.nix is a simple set with some variables that I use across my repo | 09:34:46 |
Bruno | * I have a nix error but have no clue what it means:
{ self, pkgs, ... }:
{
home-manager.users."${self.vars.username}".programs.alacritty = { ... };
home-manager.users."${self.vars.username}".programs.tmux.extraConfig = ''set -ga terminal-overrides ",alacritty:Tc"'';
}
And I'm getting the following nix error:
error: dynamic attribute 'sweenu' already defined at /nix/store/5vqbzfmprv06nfaawpn41kyx0shs4qzz-source/profiles/graphical/alacritty.nix:4:3 (sweenu being what self.vars.username evaluates to).
I have this error only on this file because I use self.vars.username several times, otherwise it works. I could just put everything under home-manager.users but I'd like to understand what the problem is. Do you have an idea of what I'm doing wrong?
| 09:45:58 |
cawilliamson | In reply to @pachumicchu:myrdd.info Also Idk whats up with the checks for this PR: https://github.com/divnix/devos/pull/403, nix flake check works fine on my system on that branch, but its failing on github actions That PR is using full paths (i.e. /home/yada_yada) in the flake.nix so those may be causing problems. | 09:52:16 |
@lourkeur:nixos.dev | In reply to @Sweenu:matrix.org
I have a nix error but have no clue what it means:
{ self, pkgs, ... }:
{
home-manager.users."${self.vars.username}".programs.alacritty = { ... };
home-manager.users."${self.vars.username}".programs.tmux.extraConfig = ''set -ga terminal-overrides ",alacritty:Tc"'';
}
And I'm getting the following nix error:
error: dynamic attribute 'sweenu' already defined at /nix/store/5vqbzfmprv06nfaawpn41kyx0shs4qzz-source/profiles/graphical/alacritty.nix:4:3 (sweenu being what self.vars.username evaluates to).
I have this error only on this file because I use self.vars.username several times, otherwise it works. I could just put everything under home-manager.users but I'd like to understand what the problem is. Do you have an idea of what I'm doing wrong?
I guess Nix isn't able to infer that "${self.vars.username}" is equal to "${self.vars.username}" in this case, so the shortcut syntax for nested sets doesn't kick in. then at runtime it turns into trying to assign both { programs.alacritty = ...; } and { programs.tmux = ...; } to the same attribute, hence the error | 10:05:20 |
Bruno | In reply to @lourkeur:nixos.dev I guess Nix isn't able to infer that "${self.vars.username}" is equal to "${self.vars.username}" in this case, so the shortcut syntax for nested sets doesn't kick in. then at runtime it turns into trying to assign both { programs.alacritty = ...; } and { programs.tmux = ...; } to the same attribute, hence the error I see, thank you. I found the related issue: https://github.com/NixOS/nix/issues/916. It's confusing that it wouldn't work for a beginner like me. Unless you understand the behind the scenes of what nix does, you couldn't imagine that this isn't supported by nix and is not an error of your making. Anyway, thanks! | 10:50:51 |
Pacman99 | In reply to @cawilliamson:nixos.dev That PR is using full paths (i.e. /home/yada_yada) in the flake.nix so those may be causing problems. Is that still there? I thought that was addressed. idk if I'm missing it but looking over the PR I don't see any full paths anymore. | 19:42:46 |
cawilliamson | In reply to @pachumicchu:myrdd.info Is that still there? I thought that was addressed. idk if I'm missing it but looking over the PR I don't see any full paths anymore. They were in flake.nix last time I looked but may have been removed now. :) | 19:43:21 |
| Pacman99 changed their display name from pachumicchu to Pacman99. | 20:56:39 |
Pacman99 | I got the CI to work on one commit, then after a rebase it failed again. So I just gave up and merged it. I'm fairly certain its a cache issue. | 22:13:09 |
| 30 Dec 2021 |
| @grahamc:nixos.org joined the room. | 00:46:09 |
| @grahamc:nixos.org left the room. | 20:03:17 |
| @grahamc:nixos.org joined the room. | 20:03:49 |
| @grahamc:nixos.orgchanged room power levels. | 20:05:38 |
| Pacman99changed room power levels. | 20:21:53 |
| @grahamc:nixos.org invited @mjolnir:nixos.org. | 20:23:16 |
| @grahamc:nixos.orgchanged room power levels. | 20:23:19 |
| @mjolnir:nixos.org joined the room. | 20:29:42 |
@teutat3s:pub.solar | With commit 838bcd1f5114c93473fdd920d49dc5abba6577bf I get
error: anonymous function at /nix/store/cwj2aqdysszjvfzfx1n9zci1niinw3cx-source/pkgs/tools/misc/nix-direnv/default.nix:1:1 called with unexpected argument 'nix'
at /nix/store/cwj2aqdysszjvfzfx1n9zci1niinw3cx-source/lib/customisation.nix:69:16:
68| let
69| result = f origArgs;
| ^
70|
(use '--show-trace' to show detailed location information)
Replacing nix-direnv with nix-direnv-flakes fixes it locally. Can anybody reproduce this?
| 22:30:43 |
Pacman99 | Ohh you might be using a nixpkgs version before this commit: https://github.com/NixOS/nixpkgs/commit/c03040cfd5fef7dc99a7663c30e33df5ebec6984#diff-109dd75e2b95e3705a18a60bc6a49e3976b539194889520d4c5b920995070104 | 22:32:45 |
@teutat3s:pub.solar | hm no, nixos -> nixpkgs is on latest release-21.11 commit | 22:35:05 |
@teutat3s:pub.solar | I think I've got something else wrong | 22:36:05 |
Pacman99 | What is your nixos commit on? | 22:42:10 |
Pacman99 | nix flake metadata --json | jq .locks.nodes.nixos.locked.rev | 22:42:11 |
@teutat3s:pub.solar | That fix I mentioned wasn’t a real fix, because I replaced both nix-direnv in that line, and didn’t change it in the profile, so the override just didn’t do anything and passed | 22:42:20 |
Pacman99 | Because I'm thinking that this is the offending line: https://github.com/divnix/devos/blob/1cbf28f445caabc4f89798a7447ee0bee580b81b/overlays/overrides.nix#L19 | 22:43:12 |
Pacman99 | But on 21.11, nix is an argument for nix-direnv, so idk why its erroring out there | 22:43:36 |