Ok, distributed. Maybe.
This commit is contained in:
parent
4e145a70d9
commit
9191593dc7
9 changed files with 76 additions and 47 deletions
|
@ -68,9 +68,6 @@
|
||||||
nixpkgs = import stable { system = "x86_64-linux"; };
|
nixpkgs = import stable { system = "x86_64-linux"; };
|
||||||
specialArgs = inputs;
|
specialArgs = inputs;
|
||||||
|
|
||||||
# Remote builds
|
|
||||||
machinesFile = ./machines.txt;
|
|
||||||
|
|
||||||
# Use a different Nixpkgs import on some systems
|
# Use a different Nixpkgs import on some systems
|
||||||
nodeNixpkgs.jupiter = import unstable { system = "x86_64-linux"; };
|
nodeNixpkgs.jupiter = import unstable { system = "x86_64-linux"; };
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,10 @@
|
||||||
stateVersion = "24.05";
|
stateVersion = "24.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
deployment.targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";
|
deployment = {
|
||||||
|
buildOnTarget = true;
|
||||||
|
targetHost = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";
|
||||||
|
};
|
||||||
|
|
||||||
networking.hostId = "97a21a38";
|
networking.hostId = "97a21a38";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
ssh://midas x86_64-linux
|
|
||||||
ssh://kitty x86_64-linux
|
|
||||||
ssh://detritus x86_64-linux
|
|
||||||
ssh://elder x86_64-linux
|
|
||||||
ssh://prophet aarch64-linux
|
|
|
@ -5,17 +5,10 @@
|
||||||
addKeysToAgent = "yes";
|
addKeysToAgent = "yes";
|
||||||
compression = true;
|
compression = true;
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
# Personal devices
|
|
||||||
tower.hostname = "4e4:535:9d47:f367:becd:6557:458d:5b1b";
|
|
||||||
intuos.hostname = "40e:404:a427:da33:163e:97b3:a2a3:9ed4";
|
|
||||||
jupiter.hostname = "5ce:969c:40d1:9575:f5e:591d:c377:a20b";
|
|
||||||
|
|
||||||
# Personal servers
|
# Personal servers
|
||||||
midas.hostname = "538:e163:87ba:f847:3646:18b6:6b01:d8f8";
|
sv1.hostname = "sv1.nixfox.ca";
|
||||||
kitty.hostname = "53f:dc2d:80c9:3ca2:4b15:ef4d:38a0:c868";
|
sv2.hostname = "sv2.nixfox.ca";
|
||||||
detritus.hostname = "5dd:9cd7:f286:e2c7:4c3b:c2e1:7832:97a3";
|
mx.hostname = "mx.nixfox.ca";
|
||||||
elder.hostname = "570:3651:7f2:c26b:bccd:725b:be00:8a18";
|
|
||||||
prophet.hostname = "42f:2737:2aed:4dee:cbe4:3c73:1918:ad9b";
|
|
||||||
|
|
||||||
# Other servers
|
# Other servers
|
||||||
bloxel.hostname = "rtmp.bloxelcom.net";
|
bloxel.hostname = "rtmp.bloxelcom.net";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./hosts
|
||||||
./mounts
|
./mounts
|
||||||
./mycelium
|
./mycelium
|
||||||
./nameservers
|
./nameservers
|
||||||
|
|
10
modules/system/devices/networking/hosts/default.nix
Normal file
10
modules/system/devices/networking/hosts/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, nodes, ... }:
|
||||||
|
{
|
||||||
|
networking.hosts = with nodes; {
|
||||||
|
"${midas.config.deployment.targetHost}" = [ "midas" ];
|
||||||
|
"${kitty.config.deployment.targetHost}" = [ "kitty" ];
|
||||||
|
"${detritus.config.deployment.targetHost}" = [ "detritus" ];
|
||||||
|
"${elder.config.deployment.targetHost}" = [ "elder" ];
|
||||||
|
"${prophet.config.deployment.targetHost}" = [ "prophet" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,41 +1,34 @@
|
||||||
{ config, lib, nodes, ... }:
|
{ config, lib, nodes, ... }:
|
||||||
{
|
{
|
||||||
fileSystems = let
|
fileSystems = let
|
||||||
netOpts = [
|
common = {
|
||||||
"noauto"
|
fsType = "nfs4";
|
||||||
"soft"
|
options = [
|
||||||
"x-systemd.automount"
|
"noauto"
|
||||||
];
|
"soft"
|
||||||
|
"x-systemd.automount"
|
||||||
|
];
|
||||||
|
};
|
||||||
in with nodes; {
|
in with nodes; {
|
||||||
"midas" = {
|
"midas" = common // {
|
||||||
device = "[${midas.config.deployment.targetHost}]:/storage";
|
device = "midas:/storage";
|
||||||
mountPoint = "/network/Midas";
|
mountPoint = "/network/Midas";
|
||||||
fsType = "nfs4";
|
|
||||||
options = netOpts;
|
|
||||||
};
|
};
|
||||||
"kitty" = {
|
"kitty" = common // {
|
||||||
device = "[${kitty.config.deployment.targetHost}]:/storage";
|
device = "kitty:/storage";
|
||||||
mountPoint = "/network/Kitty";
|
mountPoint = "/network/Kitty";
|
||||||
fsType = "nfs4";
|
|
||||||
options = netOpts;
|
|
||||||
};
|
};
|
||||||
"detritus" = {
|
"detritus" = common // {
|
||||||
device = "[${detritus.config.deployment.targetHost}]:/storage";
|
device = "detritus:/storage";
|
||||||
mountPoint = "/network/Detritus";
|
mountPoint = "/network/Detritus";
|
||||||
fsType = "nfs4";
|
|
||||||
options = netOpts;
|
|
||||||
};
|
};
|
||||||
"elder" = {
|
"elder" = common // {
|
||||||
device = "[${elder.config.deployment.targetHost}]:/storage";
|
device = "elder:/storage";
|
||||||
mountPoint = "/network/Elder";
|
mountPoint = "/network/Elder";
|
||||||
fsType = "nfs4";
|
|
||||||
options = netOpts;
|
|
||||||
};
|
};
|
||||||
"prophet" = {
|
"prophet" = common // {
|
||||||
device = "[${prophet.config.deployment.targetHost}]:/storage";
|
device = "prophet:/storage";
|
||||||
mountPoint = "/network/Prophet";
|
mountPoint = "/network/Prophet";
|
||||||
fsType = "nfs4";
|
|
||||||
options = netOpts;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./channels
|
./channels
|
||||||
|
./distributed
|
||||||
./gc
|
./gc
|
||||||
./unfree
|
./unfree
|
||||||
];
|
];
|
||||||
|
@ -14,10 +15,7 @@
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
max-jobs = 0;
|
|
||||||
trusted-users = [ "root" ];
|
|
||||||
};
|
};
|
||||||
distributedBuilds = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use a newer implementation of nixos-rebuild
|
# Use a newer implementation of nixos-rebuild
|
||||||
|
|
39
modules/system/settings/nix/distributed/default.nix
Normal file
39
modules/system/settings/nix/distributed/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{ nodes, ... }:
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
buildMachines = with nodes; [
|
||||||
|
{
|
||||||
|
hostName = midas.config.deployment.targetHost;
|
||||||
|
system = midas.config.nixpkgs.localSystem.system;
|
||||||
|
publicHostKey = "AAAAC3NzaC1lZDI1NTE5AAAAIFcFMvrx9/iUZ1mEubf+QF1i3LNTxFhaU/1zFSjdo0kK";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hostName = kitty.config.deployment.targetHost;
|
||||||
|
system = kitty.config.nixpkgs.localSystem.system;
|
||||||
|
publicHostKey = "AAAAC3NzaC1lZDI1NTE5AAAAIIrGmsya5DXKuXO6jNjUlrYHqk49KLzxM/60GXtLRLrL";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hostName = detritus.config.deployment.targetHost;
|
||||||
|
system = detritus.config.nixpkgs.localSystem.system;
|
||||||
|
publicHostKey = "AAAAC3NzaC1lZDI1NTE5AAAAIN+GvLro4DVmlvmXcasU1gctIX9qct7mZtElpB735AoL";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hostName = elder.config.deployment.targetHost;
|
||||||
|
system = elder.config.nixpkgs.localSystem.system;
|
||||||
|
publicHostKey = "AAAAC3NzaC1lZDI1NTE5AAAAIFjmJ6bkuO57gp6GZDEfR1O7krdf5wiqrOBC5pzTDl91";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hostName = prophet.config.deployment.targetHost;
|
||||||
|
system = prophet.config.nixpkgs.localSystem.system;
|
||||||
|
publicHostKey = "AAAAC3NzaC1lZDI1NTE5AAAAICrp3Y/X2BRUENx+0GMTmB1VDA6SiwkGgdJMHSdMMepM";
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
distributedBuilds = true;
|
||||||
|
settings.trusted-users = [ "root" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue