mirror of
https://github.com/thegeneralist01/config.git
synced 2026-03-07 10:59:55 +01:00
prep main darwin config
This commit is contained in:
parent
50da7ffff8
commit
523aaff701
32 changed files with 423 additions and 142 deletions
|
|
@ -1,6 +1,22 @@
|
|||
lib: inputs: self: lib.nixosSystem {
|
||||
lib: inputs: self: lib.darwinSystem {
|
||||
specialArgs = inputs // { inherit inputs; inherit self; };
|
||||
modules = [
|
||||
# Extensions: nixosModules, darwinModules, overlays
|
||||
({ pkgs, lib, inputs, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
|
||||
collect = packagePath: (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
|
||||
modules = collect [ "darwinModules" "default" ];
|
||||
# todo
|
||||
extensions = {
|
||||
nixpkgs.overlays = collect [ "overlays" "default" ];
|
||||
imports = modules;
|
||||
};
|
||||
in extensions)
|
||||
|
||||
./configuration.nix
|
||||
|
||||
# Modules
|
||||
|
|
@ -11,16 +27,5 @@ lib: inputs: self: lib.nixosSystem {
|
|||
in {
|
||||
imports = commonModules ++ darwinModules;
|
||||
})
|
||||
|
||||
# Overlays
|
||||
({ pkgs, lib, ... }: let
|
||||
inherit (lib) attrValues hasAttrByPath getAttrFromPath filter;
|
||||
packagePath = [ "overlays" "default" ];
|
||||
overlays = (attrValues inputs)
|
||||
|> filter (hasAttrByPath packagePath)
|
||||
|> map (getAttrFromPath packagePath);
|
||||
in {
|
||||
nixpkgs.overlays = overlays;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue