Files
nixos/darwin/default.nix
T

42 lines
897 B
Nix
Raw Normal View History

2025-12-29 13:47:01 -06:00
{
metadata,
nixpkgs,
top,
}:
2023-05-11 09:32:05 -05:00
let
2025-05-09 11:18:52 -05:00
inherit (top.nixunstable) lib;
mac =
{
system ? "aarch64-darwin",
name,
hm ? top.hmunstable,
}:
let
2025-12-18 10:45:24 -06:00
pkgs = nixpkgs.${system};
in
top.darwin.lib.darwinSystem {
2025-12-18 10:45:24 -06:00
inherit pkgs system;
specialArgs = {
2025-12-29 13:47:01 -06:00
inherit metadata top;
inherit (top) self;
2026-05-19 02:37:25 -05:00
pkgs' = top.self.packages.${system};
};
modules = [
{
home-manager = {
extraSpecialArgs = {
inherit top;
host = name;
};
};
}
hm.darwinModules.home-manager
2025-06-10 14:28:46 -05:00
# Local changes
../modules/nix-conf.nix
./baseline.nix
2025-11-02 22:59:43 -06:00
]
++ lib.optionals (builtins.pathExists ./hosts/${name}) [ ./hosts/${name} ];
};
in
2026-05-10 01:48:45 -05:00
(lib.genAttrs (builtins.attrNames (builtins.readDir ./hosts)) (name: mac { inherit name; }))