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
|
let
|
||||||
inherit (lib) nixosSystem;
|
inherit (lib) nixosSystem;
|
||||||
|
inherit (inputs.nix-darwin.lib) darwinSystem;
|
||||||
inherit (lib.lists) optional;
|
inherit (lib.lists) optional;
|
||||||
inherit (lib.attrsets) mapAttrs;
|
inherit (lib.attrsets) mapAttrs;
|
||||||
inherit (cfg.lib.modules) forAllUsers';
|
inherit (cfg.lib.modules) forAllUsers';
|
||||||
|
@ -35,6 +36,10 @@ let
|
||||||
(value.extraCfg or { })
|
(value.extraCfg or { })
|
||||||
] ++ optional value.graphical cfg.modules.nixos.graphical;
|
] ++ optional value.graphical cfg.modules.nixos.graphical;
|
||||||
}
|
}
|
||||||
|
else if class == "darwin" then
|
||||||
|
darwinSystem {
|
||||||
|
modules = [ cfg.modules.darwin.default ];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{ }
|
{ }
|
||||||
) hosts;
|
) hosts;
|
||||||
|
@ -42,4 +47,5 @@ in
|
||||||
{
|
{
|
||||||
imports = [ inputs.home-manager.flakeModules.home-manager ];
|
imports = [ inputs.home-manager.flakeModules.home-manager ];
|
||||||
flake.nixosConfigurations = mkConfigurations "nixos" hosts.nixos;
|
flake.nixosConfigurations = mkConfigurations "nixos" hosts.nixos;
|
||||||
|
flake.darwinConfigurations = mkConfigurations "darwin" hosts.darwin;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
shell = "fish";
|
shell = "fish";
|
||||||
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
|
pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILdsZyY3gu8IGB8MzMnLdh+ClDxQQ2RYG9rkeetIKq8n rafiq";
|
||||||
};
|
};
|
||||||
|
hosts.darwin.venus = { };
|
||||||
hosts.nixos = {
|
hosts.nixos = {
|
||||||
nemesis = {
|
nemesis = {
|
||||||
graphical = true;
|
graphical = true;
|
||||||
|
|
|
@ -74,9 +74,12 @@ in
|
||||||
type = lazyAttrsOf userOpts;
|
type = lazyAttrsOf userOpts;
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
hosts = mkOption {
|
hosts.nixos = mkOption {
|
||||||
# hosts.nixos, hosts.darwin, etc.
|
type = lazyAttrsOf hostOpts;
|
||||||
type = lazyAttrsOf (lazyAttrsOf hostOpts);
|
default = { };
|
||||||
|
};
|
||||||
|
hosts.darwin = mkOption {
|
||||||
|
type = lazyAttrsOf raw;
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,4 +11,5 @@
|
||||||
boot.kernelModules = [ "kvm-${platform}" ];
|
boot.kernelModules = [ "kvm-${platform}" ];
|
||||||
nixpkgs.hostPlatform = "${arch}-linux";
|
nixpkgs.hostPlatform = "${arch}-linux";
|
||||||
};
|
};
|
||||||
|
flake.modules.darwin.default.nixpkgs.hostPlatform = "x86_64-darwin";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue