.dotfiles/modules/home/common/sharedoptions.nix
Leon Schwarzäugl ad2241586e
Some checks are pending
Flake check / Check flake (push) Waiting to run
chore: flake maintenance
2025-09-23 18:43:44 +02:00

11 lines
443 B
Nix

{ lib, config, nixosConfig ? null, ... }:
let
# mirrorAttrs = lib.mapAttrs (_: v: lib.mkDefault v) nixosConfig.swarselsystems;
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);
}