oignon: nft: output-lan: accept HTTP(s)
[julm/julm-nix.git] / nixos / profiles / acpid.nix
index 82b70dff790c8eb663986bfa3fd081cabb18d200..c7887c1bf6160a1c7a56ceab6d834dfb49dd3f36 100644 (file)
@@ -1,32 +1,17 @@
-{ config, lib, pkgs, ... }:
+{ pkgs, ... }:
 {
-hardware.acpilight.enable = true;
-boot.kernelModules = [ "msr" "acpi_cpufreq" ];
-system.activationScripts.acPlug = ''
-  PATH="${pkgs.kmod}/bin:$PATH"
-  ${pkgs.acpi}/bin/acpi -a | grep -q 'Adapter .*: on-line' ||
-  ${pkgs.linuxPackages.cpupower}/bin/cpupower frequency-set -g powersave
-'';
-services.acpid = {
-  enable = true;
-  handlers = {
-    brightnessDown = {
-      event = "video/brightnessdown.*";
-      action = "${pkgs.acpilight}/bin/xbacklight -dec 10";
-    };
-    brightnessUp = {
-      event = "video/brightnessup.*";
-      action = "${pkgs.acpilight}/bin/xbacklight -inc 10";
+  hardware.acpilight.enable = true;
+  services.acpid = {
+    enable = true;
+    handlers = {
+      brightnessDown = {
+        event = "video/brightnessdown.*";
+        action = "${pkgs.acpilight}/bin/xbacklight -dec 10";
+      };
+      brightnessUp = {
+        event = "video/brightnessup.*";
+        action = "${pkgs.acpilight}/bin/xbacklight -inc 10";
+      };
     };
   };
-  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
-  '';
-};
 }