diff options
| Commit | 2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b (patch) | |
|---|---|---|
| Author | 2024-07-07 11:07:47 +0300 | |
| Committer | 2024-07-07 11:07:47 +0300 | |
| Files | 7a28fdffde253f112159b89e922e7a07a4035bc0 /autoconfig.nix | |
| nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.tar nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.tar.gz nix-2fe3132bb2bf8e14d0fae9e1d78ff374ae01646b.zip | ||
| Parent | 78eaa0ccb01720bb91ffe6af1a0db93ab9408317 (diff) | |
[machines] Updated sysidentity and moved stuff from configuration to hardware-configuration
1 files changed, 9 insertions, 4 deletions
| -rw-r--r-- | autoconfig.nix | 13 |
diff --git a/autoconfig.nix b/autoconfig.nix index 5da9c3a..7434a79 100644 --- a/autoconfig.nix +++ b/autoconfig.nix @@ -17,16 +17,21 @@ in { (v: ./modules + ("/" + v + (if lib.hasSuffix ".nix" v then "" else ".nix"))) sysidentity.${attrname} else []; - havelist = listget "have"; droplist = listget "drop"; + startsempty = (sysidentity ? defaultempty) && sysidentity.defaultempty; + # When we start empty, we expect to have many packages in "have" + # but when we don't start empty, we expect to have many packages in "modelist" + # So it makes more sense to make droplist remove items from the "many packages" + # list, instead of only one of the two, or both + havelist = if startsempty then listget "have" else []; modulelist = - if (sysidentity ? defaultempty) && sysidentity.defaultempty - then [] + if startsempty + then listget "have" else lib.mapAttrsToList (name: _: ./modules + ("/" + name)) (lib.filterAttrs (_: type: type == "regular") (builtins.readDir ./modules)); in - lib.subtractLists droplist (havelist ++ modulelist); + (lib.subtractLists droplist modulelist) ++ havelist; inputs-overlays = lib.mapAttrs |
