nix-config/hosts/hydra/default.nix

67 lines
1.6 KiB
Nix
Raw Normal View History

{ zentralwerk, config, pkgs, lib, ... }:
2021-03-12 21:45:12 +01:00
{
imports = [
2022-05-05 22:34:51 +02:00
./hardware-configuration.nix
./hydra.nix
./cache.nix
./updater.nix
];
2021-03-12 21:45:12 +01:00
nixpkgs.config.allowUnfree = true;
security.pam.enableSSHAgentAuth = true;
services.openssh = {
enable = true;
passwordAuthentication = false;
};
programs.mosh.enable = true;
nix = {
useSandbox = false;
maxJobs = 4;
2022-05-07 01:01:02 +02:00
buildCores = 16;
2021-03-12 21:45:12 +01:00
gc = {
automatic = true;
2021-10-18 22:23:11 +02:00
dates = lib.mkForce "06:00";
2021-03-12 21:45:12 +01:00
options = "--delete-older-than 14d";
};
2022-05-07 00:49:33 +02:00
autoOptimiseStore = true;
2021-03-12 21:45:12 +01:00
sshServe.enable = true;
trustedUsers = [ "@wheel" ];
};
boot = {
tmpOnTmpfs = true;
2022-05-07 00:49:33 +02:00
tmpOnTmpfsSize = "80%";
2022-05-06 17:41:32 +02:00
kernelPackages = pkgs.linuxPackages_latest;
2022-05-05 22:34:51 +02:00
kernelModules = [ "kvm-intel" ];
kernelParams = [ "mitigations=off" "preempt=none" ];
2021-03-12 21:45:12 +01:00
# For cross-building
2022-05-05 22:34:51 +02:00
binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "riscv32-linux" "riscv64-linux" ];
2021-03-12 21:45:12 +01:00
};
networking = {
hostName = "hydra";
firewall.enable = false;
defaultGateway = "172.20.73.1";
2022-05-05 22:34:51 +02:00
interfaces.enp3s0 = {
useDHCP = false;
tempAddress = "disabled";
ipv4.addresses = [{
address = "172.20.73.49";
prefixLength = zentralwerk.lib.config.site.net.serv.subnet4Len;
}];
};
nameservers = [ "172.20.73.8" "9.9.9.9" ];
2021-03-12 21:45:12 +01:00
};
2022-01-10 03:36:31 +01:00
2021-03-12 21:45:12 +01:00
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "20.09"; # Did you read the comment?
}