chaos-jetzt / chaos-jetzt-nixfiles

5 stars 2 forks source link

Miscelaneous touchups #23

Closed e1mo closed 1 year ago

e1mo commented 1 year ago

Various smaller changes or cleanups that, to me, wouldn't warrant a PR on their own. Besides addressing some TODOs (namely the one in the flake.nix), goals included a reduction of redundant and ambiguous code / statements (e.g. the isDev detection) and a reduction of (visual) complexity making the code easier to follow, understand and review.

There are no changes in the resulting closures:

$ nix store diff-closures --derivation git+file:.\?ref=origin/main#nixosConfigurations.shirley.config.system.build.toplevel .#nixosConfigurations.shirley.config.system.build.toplevel -vv
evaluating derivation 'git+file:.?ref=origin/main#nixosConfigurations.shirley.config.system.build.toplevel'...
using revision 2f3a7072167fca820eec403c372def8eabcca5e5 of repo '.'
evaluating file '/nix/store/sh8dmfd0g213yxs2z68c96jsaw1qcx3l-source/flake.nix'
evaluating derivation 'git+file:///home/e1mo/Documents/chaos-jetzt/chaos-jetzt-nixfiles#nixosConfigurations.shirley.config.system.build.toplevel'...
using revision 6482c8092ab7f6ba8cc5f6c7edd8fb4837a0647e of repo '/home/e1mo/Documents/chaos-jetzt/chaos-jetzt-nixfiles'
evaluating file '/nix/store/7b4hs5s5vrxrh0p56h7b2xmwil8zpcsb-source/flake.nix'

$ nix store diff-closures --derivation git+file:.\?ref=origin/main#nixosConfigurations.goldberg.config.system.build.toplevel .#nixosConfigurations.goldberg.config.system.build.toplevel -vv
evaluating derivation 'git+file:.?ref=origin/main#nixosConfigurations.goldberg.config.system.build.toplevel'...
using revision 2f3a7072167fca820eec403c372def8eabcca5e5 of repo '.'
evaluating file '/nix/store/sh8dmfd0g213yxs2z68c96jsaw1qcx3l-source/flake.nix'
evaluating derivation 'git+file:///home/e1mo/Documents/chaos-jetzt/chaos-jetzt-nixfiles#nixosConfigurations.goldberg.config.system.build.toplevel'...
using revision 6482c8092ab7f6ba8cc5f6c7edd8fb4837a0647e of repo '/home/e1mo/Documents/chaos-jetzt/chaos-jetzt-nixfiles'
evaluating file '/nix/store/7b4hs5s5vrxrh0p56h7b2xmwil8zpcsb-source/flake.nix'