-
-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I put a minimal example up here: https://github.com/Cybolic/nix-den-double-import-demo
Awesome!, @Cybolic thank you so much, I managed to reduce it even further:
I removed your routes.nix, and here is the complete hosts.nix:
let
once.nixos = { pkgs, ... }: {
users.users.test-user.packages = [ pkgs.hello ];
};
in
{
den.hosts.x86_64-linux.test-host.users.test-user = { };
den.default.includes = [ once ];
}Here's the output:
vic@nargun ~/h/nix-den-double-import-demo> nix repl
Nix 2.31.2
Type :? for help.
nix-repl> :lf .
warning: Git tree is dirty
Added 23 variables.
nix-repl> outputs.nixosConfigurations.test-host.config.users.users.test-user.packages
[
«derivation /nix/store/dzgpbp0vp7lj7lgj26rjgmnjicq2wf4k-hello-2.12.2.drv»
«repeated»
«repeated»
]
This correctly reproduces the bug (even worse, in my reduced example, we have THREE packages, when there should be only one). The problem was not submodules (attrs) but arrays, den is duplicating values and they are evident at arrays.
Thanks to both of you for helping find the bug. I will open an issue!
Originally posted by @vic in #35 (reply in thread)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working