nix-starter-configs icon indicating copy to clipboard operation
nix-starter-configs copied to clipboard

`environment.etc` already defined

Open crispyricepc opened this issue 11 months ago • 1 comments

I need to add a configuration for wireplumber, and the Nix Wiki suggests this method

I'm not able to do that from configuration.nix because environment.etc is already defined. Do you know how I can do that?

crispyricepc avatar Mar 11 '24 18:03 crispyricepc

Environment.etc is also needed for persisting files so I am also looking forward for proper solution.

For now I just commented out original definition.

ksiezak avatar Mar 20 '24 18:03 ksiezak

Hey folks.

environment.etc is an attrset. You can simply merge the provided settings with the ones you want to add, for example:

  environment.etc =
    (lib.mapAttrs'
    (name: value: {
      name = "nix/path/${name}";
      value.source = value.flake;
    })
    config.nix.registry) // {
      foo = bar;
    };

I do plan on simplifying, though, as I think the non-nixpkgs registries aren't that useful for 99% of people.

Misterio77 avatar Apr 27 '24 13:04 Misterio77

As of 8204a490a7153a55a05ccfab9e2b6292349df215, this settings is simplified a lot and should not generate confusion anymore

Misterio77 avatar Apr 27 '24 14:04 Misterio77