feat(configurations): add darwin config support
This commit is contained in:
parent
c21f7efecd
commit
9cb4542b05
4 changed files with 14 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) nixosSystem;
|
||||
inherit (inputs.nix-darwin.lib) darwinSystem;
|
||||
inherit (lib.lists) optional;
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
inherit (cfg.lib.modules) forAllUsers';
|
||||
|
@ -35,6 +36,10 @@ let
|
|||
(value.extraCfg or { })
|
||||
] ++ optional value.graphical cfg.modules.nixos.graphical;
|
||||
}
|
||||
else if class == "darwin" then
|
||||
darwinSystem {
|
||||
modules = [ cfg.modules.darwin.default ];
|
||||
}
|
||||
else
|
||||
{ }
|
||||
) hosts;
|
||||
|
@ -42,4 +47,5 @@ in
|
|||
{
|
||||
imports = [ inputs.home-manager.flakeModules.home-manager ];
|
||||
flake.nixosConfigurations = mkConfigurations "nixos" hosts.nixos;
|
||||
flake.darwinConfigurations = mkConfigurations "darwin" hosts.darwin;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
shell = "fish";
|
||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
|
||||
};
|
||||
hosts.darwin.venus = { };
|
||||
hosts.nixos = {
|
||||
nemesis = {
|
||||
graphical = true;
|
||||
|
|
|
@ -74,9 +74,12 @@ in
|
|||
type = lazyAttrsOf userOpts;
|
||||
default = { };
|
||||
};
|
||||
hosts = mkOption {
|
||||
# hosts.nixos, hosts.darwin, etc.
|
||||
type = lazyAttrsOf (lazyAttrsOf hostOpts);
|
||||
hosts.nixos = mkOption {
|
||||
type = lazyAttrsOf hostOpts;
|
||||
default = { };
|
||||
};
|
||||
hosts.darwin = mkOption {
|
||||
type = lazyAttrsOf raw;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,4 +11,5 @@
|
|||
boot.kernelModules = [ "kvm-${platform}" ];
|
||||
nixpkgs.hostPlatform = "${arch}-linux";
|
||||
};
|
||||
flake.modules.darwin.default.nixpkgs.hostPlatform = "x86_64-darwin";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue