Modular, context-aware and aspect-oriented dendritic Nix configurations. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/
at main 29 lines 896 B view raw
1{ den, inputs, ... }: 2{ 3 # The `{ HM-OS-HOST }` context is activated ONLY for hosts that have 4 # a HM supported OS and at least one user with homeManager class. 5 den.aspects.hm-global-pkgs = 6 { HM-OS-HOST }: 7 den.lib.take.unused [ HM-OS-HOST.host ] # access host from context if needed 8 { 9 nixos.home-manager.useGlobalPkgs = true; 10 }; 11 12 den.default.includes = [ den.aspects.hm-global-pkgs ]; 13 14 den.hosts.x86_64-linux.no-homes = { }; 15 16 perSystem = 17 { checkCond, rockhopper, ... }: 18 { 19 checks.rockhopper-hm-global-pkgs = checkCond "rockhopper-hm-global-pkgs" ( 20 rockhopper.config.home-manager.useGlobalPkgs 21 ); 22 23 checks.no-homes-hm-global-pkgs = checkCond "no-homes-hm-global-pkgs" ( 24 # no home-manager enabled nor useGlobalPkgs 25 !inputs.self.nixosConfigurations.no-homes.config ? home-manager.useGlobalPkgs 26 ); 27 }; 28 29}