There are two things that you’re probably not understanding here
- Nix values are immutable, meaning that you don’t get to change a value after you created it. It’s designed that way. It allows Nix to be lazy, meaning that you can only evaluate a part of a value, which allows Nixpkgs to be a huge attrset without you having to evaluate it in whole each time (and failing half way due to erroring expressions), and also allow circular definitions found in
callPackage
and overlays etc. Also by the way you risk offending the entire functional programming community saying that append to list is ‘such a basic expectation out of a programming language’. environment.systemPackages = foo;
is not ‘assignfoo
toenvironment.systemPackages
’. See here Nix lang: short syntax to add element to a list - #10 by dramforever.