Skip to content

Commit

Permalink
use pureintent as remote builder
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Nov 18, 2024
1 parent e7f21de commit c5dec72
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions configurations/nixos/vixen/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ in
self.nixosModules.default
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p14s-amd-gen4
./configuration.nix
(self + /modules/nixos/linux/distributed-build.nix)
(self + /modules/nixos/linux/gui/hyprland)
(self + /modules/nixos/linux/gui/gnome.nix)
(self + /modules/nixos/linux/gui/desktopish/fonts.nix)
Expand Down
20 changes: 17 additions & 3 deletions modules/nixos/linux/distributed-build.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# https://nixos.wiki/wiki/Distributed_build
{ flake, ... }:
let
buildHost = "pureintent";
user = flake.config.me.username;
in
{
services.openssh.settings.PermitRootLogin = "prohibit-password";
home-manager.users."root" = {
programs.ssh.matchBlocks = {
${buildHost} = {
inherit user;
identityFile = "/etc/ssh/ssh_host_ed25519_key";
};
};
};
# services.openssh.settings.PermitRootLogin = "prohibit-password";
nix.buildMachines = [
{
hostName = "thick";
hostName = buildHost;
system = "x86_64-linux";
protocol = "ssh-ng";
# if the builder supports building for multiple architectures,
# replace the previous line by, e.g.,
# systems = ["x86_64-linux" "aarch64-linux"];
maxJobs = 16;
speedFactor = 3;
speedFactor = 1;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
mandatoryFeatures = [ ];
}
Expand Down
6 changes: 5 additions & 1 deletion modules/nixos/shared/primary-as-admin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
users.users =
let
me = flake.config.me;
myKeys = [ me.sshKey ];
myKeys = [
me.sshKey
# vixen host key (see distributed-build.nix)
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIImY2zbqe3HlPF62gSgUrJI7xY3n3NEBwRi/MkDrVjp5"
];
in
{
root.openssh.authorizedKeys.keys = myKeys;
Expand Down

0 comments on commit c5dec72

Please sign in to comment.