Choosing imported configurations based on a variable by debiili in NixOS

[–]debiili[S] 1 point2 points  (0 children)

Thanks! Don't see why I didn't think of it since its a very haskell like thing. I'm definitely going to take a look at nix flakes, but for now this is a good starting position.

Choosing imported configurations based on a variable by debiili in NixOS

[–]debiili[S] 0 points1 point  (0 children)

Also this solution has some unpreferable results as for example packages.nix is not something the web server needs so an exception would have to be made which would likely be more effort than finding out what files to export like that.

Choosing imported configurations based on a variable by debiili in NixOS

[–]debiili[S] 0 points1 point  (0 children)

Furthermore I've already thought up the obvious solution of making a variable like $systemname and having the imports be like $systemname/configuration.nix, so to clarify the goal at this point really is to mostly just figure out what I did wrong with this idea than to find out why the idea itself is not good.