Compare commits

..

No commits in common. "7c92880612fb8bd066c8ec23ddc15e32cc76044d" and "4f1f81e4251de3f9e96bcd9e5c7dbe7b86df3537" have entirely different histories.

3 changed files with 82 additions and 29 deletions

54
flake.lock generated
View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688898859, "lastModified": 1688145780,
"narHash": "sha256-NjvwXnMp8oMQ86FHVhzlmgGy2dVDMGVLpZ4+YVsJgMU=", "narHash": "sha256-dNUINvO7qM7fItWSeqL2nE/F3IHCGZEeERMkm1i4pP4=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "66a3047fa88eb6aa5c5a2e675de91f0431fbe561", "rev": "43587cdb726f73b962f12028055520dbd1d7233f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -158,11 +158,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1688892808, "lastModified": 1688220547,
"narHash": "sha256-AeWzyG37EqyHH2C1GmrV9y0ZQ4e7rAs9AUOnw8I4YUI=", "narHash": "sha256-cNKKLPaEOxd6t22Mt3tHGubyylbKGdoi2A3QkMTKes0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "b70db52ff06f30e3de7f21b6ea47e75baa0c46f6", "rev": "89d10f8adce369a80e046c2fd56d1e7b7507bb5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1688259758, "lastModified": 1687654967,
"narHash": "sha256-CYVbYQfIm3vwciCf6CCYE+WOOLE3vcfxfEfNHIfKUJQ=", "narHash": "sha256-ki8vItcjn8Z8n+QD9NEoCQbbbG7VzWy71hyOkFFwCkM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "a92befce80a487380ea5e92ae515fe33cebd3ac6", "rev": "b3ec8fb525fc0c8f08eff5ef93c684b4c6d0e777",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,11 +194,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688738567, "lastModified": 1688003049,
"narHash": "sha256-yax5BYOfpE0+95kyJmEcfKEdZBaFvCENDogBB4VQB3Q=", "narHash": "sha256-5oSxbv8OVSg2dOvycJ9eisacxF8e52N0PVUFryWWJmE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "9191c85aab6b1a7ad395c13d340f2aa0e3ddf552", "rev": "bde0bc291c95b710dd63d5e5c422e47f760a1406",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -209,11 +209,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1688798314, "lastModified": 1686838567,
"narHash": "sha256-MFG5rx7L756rtrPHsL662m64AZ4sKqUcApaiYgSKfNM=", "narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "47dca15d86fdd2eabcf434d7cc0b5baa8d1a463c", "rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -225,11 +225,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1688679045, "lastModified": 1686960236,
"narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=", "narHash": "sha256-AYCC9rXNLpUWzD9hm+askOfpliLEC9kwAo7ITJc4HIw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3c7487575d9445185249a159046cc02ff364bff8", "rev": "04af42f3b31dba0ef742d254456dc4c14eedac86",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -241,11 +241,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1688868408, "lastModified": 1687031877,
"narHash": "sha256-RR9N5XTAxSBhK8MCvLq9uxfdkd7etC//seVXldy0k48=", "narHash": "sha256-yMFcVeI+kZ6KD2QBrFPNsvBrLq2Gt//D0baHByMrjFY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "510d721ce097150ae3b80f84b04b13b039186571", "rev": "e2e2059d19668dab1744301b8b0e821e3aae9c99",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -257,11 +257,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1688859638, "lastModified": 1688188316,
"narHash": "sha256-GyRhX8GlTQqDWx43uBFEYEQ/WKEqDwjzABHxUCatAno=", "narHash": "sha256-CXuQllDKCxtZaB/umnZOvoJ/d4kJguYgffeTA9l1B3o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d485da9d0034a72ceb9679c2ab0156c073f66b82", "rev": "8277b539d371bf4308fc5097911aa58bfac1794f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -294,11 +294,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1688873469, "lastModified": 1687398569,
"narHash": "sha256-9TMSXvXmrr7bDYi+WeskWe/yho9UP01dGbV9vW5bRVc=", "narHash": "sha256-e/umuIKFcFtZtWeX369Hbdt9r+GQ48moDmlTcyHWL28=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "b2047c8fc963407916ad3834165309007dc5a1f7", "rev": "2ff6973350682f8d16371f8c071a304b8067f192",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -19,6 +19,10 @@
boot.loader.generic-extlinux-compatible.enable = false; boot.loader.generic-extlinux-compatible.enable = false;
boot.kernelPackages = pkgs.linuxPackages_rpi4; boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.loader.raspberryPi = {
enable = true;
version = 4;
};
# networking.hostName = "nixos"; # Define your hostname. # networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

View File

@ -1,6 +1,31 @@
{ config, nixpkgs, pkgs, ... }: { { config, nixpkgs, pkgs, ... }:
let
dataDir = "/var/lib/darwin-builder";
port = 33022;
darwin-builder = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
"${nixpkgs}/nixos/modules/profiles/macos-builder.nix"
{
system.nixos.revision = nixpkgs.lib.mkForce null;
virtualisation.host.pkgs = pkgs;
virtualisation.darwin-builder.hostPort = port;
virtualisation.darwin-builder.workingDirectory = dataDir;
}
];
};
in
{
nix.distributedBuilds = true; nix.distributedBuilds = true;
nix.buildMachines = [ nix.buildMachines = [
{
hostName = "builder";
systems = [ "aarch64-linux" ];
maxJobs = 4;
speedFactor = 2;
supportedFeatures = [ "kvm" "benchmark" "big-parallel" ];
}
{ {
hostName = "plato"; hostName = "plato";
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
@ -8,5 +33,29 @@
supportedFeatures = [ "benchmark" "big-parallel" "kvm" ]; supportedFeatures = [ "benchmark" "big-parallel" "kvm" ];
} }
]; ];
nix.linux-builder.enable = true; nix.settings.builders-use-substitutes = true;
# We can't/want to edit /var/root/.ssh/config so instead we create the config at another location and tell ssh to use that instead by modifying NIX_SSHOPTS
environment.etc."nix/ssh_config".text = ''
Host builder
User builder
HostName 127.0.0.1
Port ${toString port}
IdentityFile ${dataDir}/keys/builder_ed25519
Host plato
IdentityFile /var/root/.ssh/id_plato
'';
# Tell nix-daemon to use our custom SSH config
nix.envVars = { NIX_SSHOPTS = "-F /etc/nix/ssh_config"; };
launchd.daemons.darwin-builder = {
command = "${darwin-builder.config.system.build.macos-builder-installer}/bin/create-builder";
serviceConfig = {
KeepAlive = true;
RunAtLoad = true;
StandardOutPath = "/var/log/darwin-builder.log";
StandardErrorPath = "/var/log/darwin-builder.log";
};
};
} }