mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: share config between nixos / home-manager
This commit is contained in:
parent
641a0cd84d
commit
57d5ea065a
166 changed files with 1029 additions and 1031 deletions
12
modules/home/common/sharedoptions.nix
Normal file
12
modules/home/common/sharedoptions.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, nixosConfig, ... }:
|
||||
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 = mkDefaultCommonAttrs config.swarselsystems nixosConfig.swarselsystems;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue