Преглед изворни кода

feat(odin): zenpower kernel module

Zander Hawke пре 9 месеци
родитељ
комит
4f76ae3a9e
3 измењених фајлова са 26 додато и 5 уклоњено
  1. 1 4
      hosts/odin/default.nix
  2. 4 1
      hosts/odin/system.nix
  3. 21 0
      packages/quick-setup.nix

+ 1 - 4
hosts/odin/default.nix

@@ -102,6 +102,7 @@
   # System packages
   environment.systemPackages = with pkgs; [
     # System utilities
+    git
     htop
     btop
     iotop
@@ -123,10 +124,6 @@
     # # Container tools
     # docker-compose
 
-    # Storage management
-    snapraid
-    mergerfs
-
     # Monitoring
     lm_sensors
     nvme-cli

+ 4 - 1
hosts/odin/system.nix

@@ -11,8 +11,10 @@
     loader.timeout = 3;
 
     # Kernel parameters for server workload
+    blacklistedKernelModules = [ "k10temp" ];
     kernelParams = [ "rootflags=compress=zstd:1,noatime" ];
-    kernelModules = [ "nct6775" ];
+    kernelModules = [ "zenpower" "nct6775" ];
+    extraModulePackages = [ config.boot.kernelPackages.zenpower ];
 
     # Enable KSM for memory efficiency with containers
     kernel.sysctl = {
@@ -22,6 +24,7 @@
     };
   };
 
+
   hardware.fancontrol = {
     enable = true;
     config = ''

+ 21 - 0
packages/quick-setup.nix

@@ -0,0 +1,21 @@
+{ coreutils
+, git
+, lib
+, nix
+, writeShellScriptBin
+}:
+
+let
+  core = name: "${lib.getExe coreutils name}";
+  gitBin = lib.getExe git;
+  nixBin = lib.getExe nix;
+in
+
+writeShellScriptBin "quick-setup" ''
+  ${core "mkdir"} -p ~/workspace/control
+  ${core "cd"} ~/workspace/control
+  ${gitBin} clone [email protected]:control/home
+  ${core "cd"} home
+  ${nixBin} run github:nix-community/home-manager -- \
+    switch --flake .#$(whoami)@$(hostname)
+''