nixcfg/systems/nixbuild.nix
Harald Hoyer 45c3c766cb chore(nixbuild): remove deprecated shellInit for SSH sessions
- Deleted `environment.shellInit` previously used for Nix path initialization in SSH sessions.
- Path initialization is now fully handled by `programs.fish.loginShellInit` for consistency across environments.
2025-11-13 11:54:03 +01:00

49 lines
1.1 KiB
Nix

{ ... }:
{
nix.distributedBuilds = true;
nix.buildMachines = [
{
hostName = "m4";
system = "aarch64-darwin";
maxJobs = 4;
speedFactor = 3;
sshUser = "harald";
sshKey = "/etc/ssh/nix-builder-key";
}
{
hostName = "rialo";
system = "aarch64-darwin";
maxJobs = 4;
speedFactor = 3;
sshUser = "harald";
sshKey = "/etc/ssh/nix-builder-key";
}
{
hostName = "sgx";
system = "x86_64-linux";
maxJobs = 4;
speedFactor = 1;
sshUser = "harald";
sshKey = "/etc/ssh/nix-builder-key";
}
];
nix.settings = {
/*
substituters = [
"https://cache.nixos.org"
"ssh-ng://harald@m4?ssh-key=/etc/ssh/nix-builder-key"
"ssh-ng://harald@rialo?ssh-key=/etc/ssh/nix-builder-key"
"ssh-ng://harald@sgx?ssh-key=/etc/ssh/nix-builder-key"
];
*/
builders-use-substitutes = true;
};
# Ensure Nix is in PATH for SSH sessions
programs.fish.loginShellInit = ''
set -gx PATH /nix/var/nix/profiles/default/bin $PATH
set -gx PATH /run/current-system/sw/bin $PATH
'';
}