my nix configs for my servers and desktop
1# Do not modify this file! It was generated by ‘nixos-generate-config’
2# and may be overwritten by future invocations. Please make changes
3# to /etc/nixos/configuration.nix instead.
4{ config, lib, pkgs, modulesPath, ... }:
5
6{
7 imports =
8 [ (modulesPath + "/installer/scan/not-detected.nix")
9 ];
10
11 boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "mpt3sas" "sd_mod" ];
12 boot.initrd.kernelModules = [ ];
13 boot.kernelModules = [ "kvm-amd" ];
14 boot.extraModulePackages = [ ];
15
16 fileSystems."/" = {
17 device = "/dev/disk/by-uuid/17b399da-2210-4493-9ae3-c65b20b992a0";
18 fsType = "ext4";
19 };
20
21 fileSystems."/boot" =
22 { device = "/dev/disk/by-uuid/6340-211B";
23 fsType = "vfat";
24 options = [ "fmask=0022" "dmask=0022" ];
25 };
26
27/* fileSystems."/garage" = {
28 device = "garage";
29 fsType = "zfs";
30 };
31
32 fileSystems."/storage" = {
33 device = "storage";
34 fsType = "zfs";
35 };*/
36
37 swapDevices = [ ];
38
39 # Fan Control
40 hardware.fancontrol = {
41 enable = false;
42 config = ''
43INTERVAL=10
44DEVPATH=hwmon1=devices/platform/nct6775.2592 hwmon2=devices/platform/coretemp.0
45DEVNAME=hwmon1=nct6795 hwmon2=coretemp
46FCTEMPS=hwmon1/pwm2=hwmon2/temp1_input hwmon1/pwm3=hwmon2/temp1_input
47FCFANS=hwmon1/pwm2=hwmon1/fan2_input hwmon1/pwm3=hwmon1/fan3_input
48MINTEMP=hwmon1/pwm2=20 hwmon1/pwm3=20
49MAXTEMP=hwmon1/pwm2=65 hwmon1/pwm3=60
50MINSTART=hwmon1/pwm2=38 hwmon1/pwm3=75
51MINSTOP=hwmon1/pwm2=28 hwmon1/pwm3=75
52MINPWM=hwmon1/pwm2=28 hwmon1/pwm3=75
53MAXPWM=hwmon1/pwm2=150 hwmon1/pwm3=105
54 '';
55 };
56
57 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
58 # (the default) this is the recommended approach. When using systemd-networkd it's
59 # still possible to use this option, but it's recommended to use it in conjunction
60 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
61 networking.useDHCP = lib.mkDefault true;
62 hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
63 # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
64}