chore: try allowing nix darwin builds
This commit is contained in:
+21
-10
@@ -1,23 +1,32 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
top,
|
top,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
builder-config = {
|
system = builtins.replaceStrings [ "darwin" ] [ "linux" ] pkgs.stdenv.hostPlatform.system;
|
||||||
darwin-aarch-builder = top.self.nixosConfigurations.builder-aarch;
|
builderConfig = top.nixunstable.lib.nixosSystem {
|
||||||
darwin-x86-builder = top.self.nixosConfigurations.builder-x86;
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
"${top.nixunstable}/nixos/modules/profiles/nix-builder-vm.nix"
|
||||||
|
{
|
||||||
|
virtualisation = {
|
||||||
|
host.pkgs = pkgs;
|
||||||
|
darwin-builder = {
|
||||||
|
workingDirectory = "/var/lib/darwin-builder";
|
||||||
|
hostPort = 22;
|
||||||
};
|
};
|
||||||
builder = arch: let
|
};
|
||||||
b = builder-config."darwin-${arch}-builder";
|
}
|
||||||
in {
|
];
|
||||||
command = "${b.config.system.build.macos-builder-installer}/bin/create-builder";
|
};
|
||||||
|
builder = {
|
||||||
|
command = "${builderConfig.config.system.build.macos-builder-installer}/bin/create-builder";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
KeepAlive = true;
|
KeepAlive = true;
|
||||||
RunAtLoad = true;
|
RunAtLoad = true;
|
||||||
StandardOutPath = "/var/log/builder-vm-${arch}.log";
|
StandardOutPath = "/var/log/builder-vm-${system}.log";
|
||||||
StandardErrorPath = "/var/log/builder-vm-${arch}.stderr.log";
|
StandardErrorPath = "/var/log/builder-vm-${system}.stderr.log";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
@@ -32,6 +41,8 @@ in
|
|||||||
nerd-fonts.hack
|
nerd-fonts.hack
|
||||||
];
|
];
|
||||||
|
|
||||||
|
launchd.daemons.darwin-builder = builder;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gc.interval.Hour = 3;
|
gc.interval.Hour = 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user