copyright: comply with REUSE-3.0
[julm/julm-nix.git] / hosts / oignon / hardware.nix
index 5c06225d2e5ec8bb945057071ebac3130b3c95fb..e3fb24905901d04d7061ab9775514516b7809eec 100644 (file)
@@ -13,14 +13,14 @@ services.thinkfan = {
   smartSupport = true;
   levels = [
     [0     0      57]
-    [1     56     62]
-    [2     61     65]
-    [3     64     66]
-    [4     65     68]
-    [5     67     71]
-    [6     70     76]
-    [7     75     81]
-    [127   80     32767]
+    [1     56     60]
+    [2     59     63]
+    [3     62     65]
+    [4     64     67]
+    [5     66     72]
+    [6     71     78]
+    [7     77     82]
+    [127   81     32767]
   ];
 };
 hardware.acpilight.enable = true;
@@ -35,19 +35,16 @@ services.acpid = {
       event = "video/brightnessup.*";
       action = "${pkgs.acpilight}/bin/xbacklight -inc 5";
     };
-    acAdapter = {
-      event = "ac_adapter/*";
-      action = ''
-        vals=($1)
-        case ''${vals[3]} in
-          00000000) # unplugged
-            ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave;;
-          00000001) # plugged in
-            ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g ondemand;;
-        esac
-      '';
-    };
   };
+  acEventCommands = ''
+    vals=($1)
+    case ''${vals[3]} in
+      00000000) # unplugged
+        ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave;;
+      00000001) # plugged in
+        ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g ondemand;;
+    esac
+  '';
 };
 
 # https://bugzilla.kernel.org/show_bug.cgi?id=110941
@@ -60,19 +57,22 @@ boot.tmpOnTmpfs = true;
 boot.extraModulePackages = [
   #config.boot.kernelPackages.exfat-nofuse
 ];
+/*
+boot.loader.efi = {
+  canTouchEfiVariables = true;
+  efiSysMountPoint = "/boot/efi";
+};
+*/
+# No pstore backend available on this system.
+systemd.services.mount-pstore.enable = false;
 boot.loader.grub = {
   enable  = true;
   version = 2;
   device  = "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_S1SMNSAFC36436X";
   configurationLimit = 3;
+
   #zfsSupport = true;
-  /*
-  efiSupport = true;
-  efi = {
-    canTouchEfiVariables = false;
-    efiSysMountPoint = "/boot/efi";
-  };
-  */
+  #efiSupport = true;
   #enableCryptodisk = true;
 };