2018-05-12 13:51:24 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2018-11-10 17:56:25 +00:00
|
|
|
|
2018-05-12 13:51:24 +00:00
|
|
|
{
|
2018-11-10 17:56:25 +00:00
|
|
|
|
2018-05-12 13:51:24 +00:00
|
|
|
imports = [
|
|
|
|
./config.nix
|
2018-11-10 17:56:25 +00:00
|
|
|
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
2018-05-12 13:51:24 +00:00
|
|
|
];
|
|
|
|
|
2018-11-10 17:56:25 +00:00
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" ];
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
2023-08-23 20:07:31 +00:00
|
|
|
boot.swraid.enable = true;
|
2018-11-10 17:56:25 +00:00
|
|
|
|
|
|
|
fileSystems."/" = {
|
|
|
|
device = "rpool/root/nixos";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/d155d6ff-8e89-4876-a9e7-d1b7ba6a4804";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
2019-09-22 09:57:38 +00:00
|
|
|
fileSystems."/backups" = {
|
|
|
|
device = "tank/backups";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2018-11-10 17:56:25 +00:00
|
|
|
fileSystems."/srv/http" = {
|
|
|
|
device = "tank/srv-http";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2018-11-30 03:35:39 +00:00
|
|
|
fileSystems."/var/download" = {
|
|
|
|
device = "tank/download";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2018-11-10 17:56:25 +00:00
|
|
|
fileSystems."/var/lib/containers" = {
|
|
|
|
device = "tank/containers";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/home" = {
|
|
|
|
device = "tank/home";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2019-01-04 15:35:09 +00:00
|
|
|
fileSystems."/var/lib/nextcloud" = {
|
|
|
|
device = "tank/nextcloud";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2019-01-04 16:25:50 +00:00
|
|
|
fileSystems."/var/lib/libvirt" = {
|
|
|
|
device = "tank/libvirt";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
2020-09-27 13:23:59 +00:00
|
|
|
fileSystems."/var/realwallpaper/archive" = {
|
|
|
|
device = "tank/wallpaper";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/home/xanf" = {
|
|
|
|
device = "/dev/disk/by-id/wwn-0x500a07511becb076";
|
|
|
|
fsType = "ext4";
|
|
|
|
};
|
|
|
|
|
2021-10-24 14:58:08 +00:00
|
|
|
# silence mdmonitor.service failures
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/72394
|
|
|
|
environment.etc."mdadm.conf".text = ''
|
|
|
|
MAILADDR root
|
|
|
|
'';
|
|
|
|
|
2018-11-10 17:56:25 +00:00
|
|
|
nix.maxJobs = lib.mkDefault 8;
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
|
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
boot.loader.grub.devices = [ "/dev/sda" "/dev/sdb" ];
|
|
|
|
|
2022-11-24 16:15:14 +00:00
|
|
|
# we don't pay for power there and this might solve a problem we observed at least once
|
|
|
|
# https://www.thomas-krenn.com/de/wiki/PCIe_Bus_Error_Status_00001100_beheben
|
2023-08-23 20:07:31 +00:00
|
|
|
boot.kernelParams = [ "pcie_aspm=off" "net.ifnames=0" "nomodeset" ];
|
2022-01-12 18:53:05 +00:00
|
|
|
networking.dhcpcd.enable = false;
|
2022-11-24 16:15:14 +00:00
|
|
|
|
2023-07-25 14:30:21 +00:00
|
|
|
|
|
|
|
networking.useNetworkd = lib.mkForce false;
|
|
|
|
systemd.network.enable = lib.mkForce false;
|
2022-11-24 16:15:14 +00:00
|
|
|
# bridge config
|
|
|
|
networking.bridges."ext-br".interfaces = [ "eth0" ];
|
2018-11-10 17:56:25 +00:00
|
|
|
networking = {
|
|
|
|
hostId = "2283aaae";
|
|
|
|
defaultGateway = "95.216.1.129";
|
2022-11-24 16:15:14 +00:00
|
|
|
defaultGateway6 = { address = "fe80::1"; interface = "ext-br"; };
|
2018-11-10 17:56:25 +00:00
|
|
|
# Use google's public DNS server
|
|
|
|
nameservers = [ "8.8.8.8" ];
|
2022-11-24 16:15:14 +00:00
|
|
|
interfaces.ext-br.ipv4.addresses = [
|
2019-01-22 15:28:50 +00:00
|
|
|
{
|
|
|
|
address = "95.216.1.150";
|
|
|
|
prefixLength = 26;
|
|
|
|
}
|
|
|
|
];
|
2022-11-24 16:15:14 +00:00
|
|
|
interfaces.ext-br.ipv6.addresses = [
|
2022-01-12 18:53:05 +00:00
|
|
|
{
|
|
|
|
address = "2a01:4f9:2a:1e9::1";
|
|
|
|
prefixLength = 64;
|
|
|
|
}
|
|
|
|
];
|
2018-11-10 17:56:25 +00:00
|
|
|
};
|
2022-11-24 16:15:14 +00:00
|
|
|
|
2018-05-12 13:51:24 +00:00
|
|
|
}
|