2023-09-25 00:15:15 +00:00
|
|
|
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
|
|
|
# and may be overwritten by future invocations. Please make changes
|
|
|
|
|
# to /etc/nixos/configuration.nix instead.
|
2023-09-25 01:11:58 +00:00
|
|
|
|
{ config, lib, modulesPath, ... }:
|
2023-09-25 00:15:15 +00:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports = [
|
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
kernelModules = [ "kvm-amd" "k10temp" ];
|
|
|
|
|
|
|
|
|
|
kernel.sysctl = {
|
|
|
|
|
"net.ipv6.conf.all.disable_ipv6" = 0;
|
|
|
|
|
"net.core.default_qdisc"="fq";
|
|
|
|
|
"net.ipv4.tcp_congestion_control"="bbr";
|
|
|
|
|
"net.ipv6.conf.all.forwarding"=0;
|
|
|
|
|
"net.ipv4.conf.all.forwarding"=1;
|
|
|
|
|
"fs.inotify.max_user_watches"=524288;
|
|
|
|
|
"kernel.panic"=10;
|
|
|
|
|
"kernel.nmi_watchdog"=1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
initrd = {
|
|
|
|
|
verbose = false;
|
|
|
|
|
availableKernelModules = [
|
|
|
|
|
"xhci_pci"
|
|
|
|
|
"ahci"
|
|
|
|
|
"nvme"
|
|
|
|
|
"usb_storage"
|
|
|
|
|
"usbhid"
|
|
|
|
|
"sd_mod"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
loader = {
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
systemd-boot = {
|
|
|
|
|
enable = true;
|
|
|
|
|
configurationLimit = 10;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot" = {
|
|
|
|
|
#device = "/dev/disk/by-uuid/8665-8D88";
|
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
#options = [ "discard" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/nix" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/576b6514-6cc0-e049-ba86-6f0158da9687";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
options = [ "discard" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/data" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/400f8c26-4989-4600-81a4-0974be94a0e9";
|
|
|
|
|
fsType = "ext4";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/backup" = {
|
|
|
|
|
device = "192.168.1.25:/volume1/docker_volumes/backup";
|
|
|
|
|
fsType = "nfs";
|
|
|
|
|
options = [ "x-systemd.automount" "noauto" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
|
|
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
|
|
|
# still possible to use this option, but it's recommended to use it in conjunction
|
|
|
|
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
|
|
|
# networking.useDHCP = lib.mkDefault true;
|
|
|
|
|
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
|
|
|
|
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
networking.hostName = "homeserver";
|
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
networking.nameservers = [
|
|
|
|
|
"223.5.5.5"
|
|
|
|
|
"223.6.6.6"
|
|
|
|
|
"2400:3200::1"
|
|
|
|
|
"2400:3200:baba::1"
|
|
|
|
|
];
|
|
|
|
|
networking.interfaces.eth0 = {
|
|
|
|
|
ipv4.addresses = [{
|
|
|
|
|
address = "192.168.1.42";
|
|
|
|
|
prefixLength = 24;
|
|
|
|
|
}];
|
|
|
|
|
};
|
|
|
|
|
networking.defaultGateway = {
|
|
|
|
|
interface = "eth0";
|
|
|
|
|
address = "192.168.1.1";
|
|
|
|
|
};
|
|
|
|
|
networking.defaultGateway6 = {
|
|
|
|
|
interface = "eth0";
|
|
|
|
|
address = "fe80::1af2:2cff:fed3:d5a2";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
#powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
}
|