63 lines
2.1 KiB
Nix
63 lines
2.1 KiB
Nix
|
# 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.
|
|||
|
{ config, lib, pkgs, modulesPath, ... }:
|
|||
|
|
|||
|
{
|
|||
|
imports =
|
|||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|||
|
];
|
|||
|
|
|||
|
boot.initrd.availableKernelModules = [ ];
|
|||
|
boot.initrd.kernelModules = [ ];
|
|||
|
boot.kernelModules = [ ];
|
|||
|
boot.extraModulePackages = [ ];
|
|||
|
|
|||
|
fileSystems."/" =
|
|||
|
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
|||
|
fsType = "ext4";
|
|||
|
};
|
|||
|
|
|||
|
swapDevices = [ ];
|
|||
|
|
|||
|
# 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.end0.useDHCP = lib.mkDefault true;
|
|||
|
|
|||
|
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|||
|
|
|||
|
# Based on the config from https://www.armbian.com/odroid-hc4/
|
|||
|
hardware.fancontrol = {
|
|||
|
enable = lib.mkDefault true;
|
|||
|
config = let
|
|||
|
# According to https://www.armbian.com/odroid-hc4/ the FCFANS line should be removed on kernel 5.15.
|
|||
|
kernelVersion = config.boot.kernelPackages.kernel.version;
|
|||
|
needFcFans = lib.versions.majorMinor kernelVersion != "5.15";
|
|||
|
in lib.mkDefault (''
|
|||
|
INTERVAL=10
|
|||
|
DEVPATH=hwmon0=devices/virtual/thermal/thermal_zone0 hwmon2=devices/platform/pwm-fan
|
|||
|
DEVNAME=hwmon0=cpu_thermal hwmon2=pwmfan
|
|||
|
FCTEMPS=hwmon2/pwm1=hwmon0/temp1_input
|
|||
|
'' + lib.optionalString needFcFans ''
|
|||
|
FCFANS= hwmon2/pwm1=hwmon2/fan1_input
|
|||
|
'' + ''
|
|||
|
MINTEMP=hwmon2/pwm1=50
|
|||
|
MAXTEMP=hwmon2/pwm1=60
|
|||
|
MINSTART=hwmon2/pwm1=20
|
|||
|
MINSTOP=hwmon2/pwm1=28
|
|||
|
MINPWM=hwmon2/pwm1=0
|
|||
|
MAXPWM=hwmon2/pwm1=255
|
|||
|
'');
|
|||
|
};
|
|||
|
|
|||
|
# Linux 5.15 sometimes crash under heavy network usage
|
|||
|
systemd.watchdog.runtimeTime = lib.mkDefault "1min";
|
|||
|
|
|||
|
hardware.deviceTree.filter = "meson-sm1-odroid-hc4.dtb";
|
|||
|
|
|||
|
}
|
|||
|
|