.dotfiles/modules/home/common/sharedoptions.nix
Leon Schwarzäugl 35f108e3fc
Some checks failed
Flake check / Check flake (push) Has been cancelled
chore[client]: map treehouse to physical host
2025-10-23 14:47:00 +02:00

11 lines
452 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 or { }));
}