Set up hydra as a remote build machine.
This commit is contained in:
committed by
Tom Alexander
parent
24e03ed8f7
commit
776ed67675
@@ -18,10 +18,43 @@
|
||||
];
|
||||
|
||||
config = {
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
networking.hostId = "6fbf418b";
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
hostId = "6fbf418b";
|
||||
|
||||
networking.hostName = "hydra"; # Define your hostname.
|
||||
hostName = "hydra"; # Define your hostname.
|
||||
|
||||
interfaces = {
|
||||
"${interface}" = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "10.215.1.219";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
|
||||
ipv6.addresses = [
|
||||
{
|
||||
address = "2620:11f:7001:7:ffff:ffff:0ad7:01db";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
defaultGateway = "10.215.1.1";
|
||||
defaultGateway6 = {
|
||||
# address = "2620:11f:7001:7::1";
|
||||
address = "2620:11f:7001:7:ffff:ffff:0ad7:0101";
|
||||
inherit interface;
|
||||
};
|
||||
|
||||
dhcpcd.enable = lib.mkForce false;
|
||||
useDHCP = lib.mkForce false;
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
@@ -63,13 +96,42 @@
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
git # for building on hydra
|
||||
tmux # for building on hydra
|
||||
nix-output-monitor # for building on hydra
|
||||
];
|
||||
|
||||
# nix.sshServe.enable = true;
|
||||
# nix.sshServe.keys = [ "ssh-dss AAAAB3NzaC1k... bob@example.org" ];
|
||||
|
||||
# Override garbage collection to keep things longer
|
||||
# Automatic garbage collection
|
||||
nix.gc = lib.mkForce {
|
||||
automatic = true;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
# randomizedDelaySec = "14m";
|
||||
options = "--delete-older-than 60d";
|
||||
};
|
||||
|
||||
# The default limit of files is 1024 which is too low for some nix builds.
|
||||
#
|
||||
# Check with `ulimit -n`
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
item = "nofile";
|
||||
type = "-";
|
||||
value = "8192";
|
||||
}
|
||||
];
|
||||
|
||||
# systemd.user.extraConfig = "DefaultLimitNOFILE=8192";
|
||||
# systemd.services."user@11400".serviceConfig.LimitNOFILE = "8192";
|
||||
|
||||
me.build_in_ram.enable = true;
|
||||
me.dont_use_substituters.enable = true;
|
||||
me.hydra.enable = true;
|
||||
me.minimal_base.enable = true;
|
||||
me.nix_worker.enable = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user