diff --git a/SwarselSystems.org b/SwarselSystems.org index bb55bde..dc06245 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -3814,11 +3814,6 @@ in } #+end_src -**** Mirror home-manager shared options (automatically active) -:PROPERTIES: -:CUSTOM_ID: h:30b81bf9-1e69-4ce8-88af-5592896bcee4 -:END: - #+begin_src nix-ts :tangle modules/home/common/sharedoptions.nix { lib, config, nixosConfig ? null, ... }: @@ -10336,6 +10331,27 @@ This section sets up all the imports that are used in the home-manager section. } #+end_src +**** Mirror home-manager shared options (automatically active) +:PROPERTIES: +:CUSTOM_ID: h:30b81bf9-1e69-4ce8-88af-5592896bcee4 +:END: + + +#+begin_src nix-ts :tangle modules/home/common/sharedoptions.nix + { lib, config, nixosConfig ? null, ... }: + let + # mirrorAttrs = lib.mapAttrs (_: v: lib.mkDefault v) nixosConfig.swarselsystems; + inherit (lib) mkDefault mapAttrs filterAttrs; + mkDefaultCommonAttrs = base: defaults: + lib.mapAttrs (_: v: lib.mkDefault v) + (lib.filterAttrs (k: _: base ? ${k}) defaults); + in + { + # config.swarselsystems = mirrorAttrs; + config.swarselsystems = lib.mkIf (nixosConfig != null) (mkDefaultCommonAttrs config.swarselsystems nixosConfig.swarselsystems); + } +#+end_src + **** General home-manager-settings :PROPERTIES: :CUSTOM_ID: h:4af4f67f-7c48-4754-b4bd-6800e3a66664