made a build and nixremote modules.

This commit is contained in:
2025-09-27 16:31:05 -06:00
parent 8cd5e390cf
commit 4b81028cde
7 changed files with 198 additions and 166 deletions

View File

@@ -1,11 +1,32 @@
{ ... }:
{ config, ... }:
{
imports = [
./hardware-configuration.nix
../../config/base.nix
../../config/stylix.nix
];
my = import ./toggles.nix;
my = import ./toggles.nix // {
nix.cores = 3;
nix.maxJobs = 8;
users.nixremote.enable = true;
users.nixremote.authorizedKeys = [
../../secrets/ssh/ed25519_nixworkstation.pub
../../secrets/ssh/ed25519_nixserver.pub
];
};
nix.buildMachines =
let
buildMachine = hostName: maxJobs: speedFactor: {
inherit hostName maxJobs speedFactor;
system = "x86_64-linux";
sshUser = "nixremote";
supportedFeatures = config.my.nix.features;
};
in
[
(buildMachine "workstation" 16 40)
(buildMachine "server" 16 17)
];
networking = {
hostName = "miniserver";
firewall = {
@@ -13,47 +34,7 @@
allowedUDPPorts = [ 2049 ];
};
};
nix = {
settings = {
cores = 3;
max-jobs = 8;
};
buildMachines =
let
buildMachine = hostName: maxJobs: speedFactor: {
inherit hostName maxJobs speedFactor;
system = "x86_64-linux";
sshUser = "nixremote";
supportedFeatures = [
"nixos-test"
"benchmark"
"big-parallel"
"kvm"
"gccarch-znver3"
"gccarch-skylake"
"gccarch-alderlake"
];
};
in
[
(buildMachine "workstation" 16 40)
(buildMachine "server" 16 17)
];
};
nixpkgs.config.permittedInsecurePackages = [ "openssl-1.1.1w" ];
users = {
groups.nixremote.gid = 555;
users.nixremote = {
isNormalUser = true;
createHome = true;
group = "nixremote";
home = "/var/nixremote/";
openssh.authorizedKeys.keyFiles = [
../../secrets/ssh/ed25519_nixworkstation.pub
../../secrets/ssh/ed25519_nixserver.pub
];
};
};
services = {
btrfs.autoScrub = {
enable = true;