Added specific configs from arnarg/config
This commit is contained in:
1 parent
b313d7a4f8
commit
b80f189128
5 files changed
+150
-32
No files matched your search
@@ -2,38 +2,69 @@
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
hddled = pkgs.stdenv.mkDerivation rec {
|
||||
name = "hddled_tmj33-${version}-${kernel.version}";
|
||||
version = "0.3";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "arnarg";
|
||||
repo = "hddled_tmj33";
|
||||
rev = version;
|
||||
sha256 = "sha256-sQ8fLK8NP5sHw/9gJTO6lqgWfwmi1G5KDwWuWujNCZw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
# We don't want to depmod yet, just build and package the module
|
||||
preConfigure = ''
|
||||
sed -i 's|depmod|#depmod|' Makefile
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"TARGET=${kernel.modDirVersion}"
|
||||
"KERNEL_MODULES=${kernel.dev}/lib/modules/${kernel.modDirVersion}"
|
||||
"MODDESTDIR=$(out)/lib/modules/${kernel.modDirVersion}/kernel/drivers/misc"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usbhid" "uas" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.extraModulePackages = with pkgs.linuxPackages; [
|
||||
it87
|
||||
hddled
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
"coretemp"
|
||||
"drivetemp"
|
||||
"it87"
|
||||
"hddled_tmj33"
|
||||
];
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a3b275b4-96d4-4eb4-b01f-d80370899791";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a3b275b4-96d4-4eb4-b01f-d80370899791";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AAA7-BCE9";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/AAA7-BCE9";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
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.enp0s21f0u5.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nix.settings.max-jobs = 2;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||
}
|
||||
+1
-17
@@ -6,22 +6,6 @@
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.extraModulePackages = with pkgs.linuxPackages; [ it87 ];
|
||||
boot.kernelModules = ["coretemp" "it87" "drivetemp"];
|
||||
systemd.services.fancontrol = {
|
||||
enable = true;
|
||||
description = "Fan control";
|
||||
wantedBy = ["multi-user.target" "graphical.target" "rescue.target"];
|
||||
|
||||
unitConfig = {
|
||||
Type = "simple";
|
||||
};
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.lm_sensors}/bin/fancontrol";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
homelab.hardware.fan2go.enable = true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user