Merge branch 'disable-acpid' of git://github.com/ambrop72/nixpkgs
power-management: Don't enable acpid.
This commit is contained in:
commit
a82ca6a7f9
2 changed files with 9 additions and 4 deletions
|
@ -65,9 +65,6 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
# Enable the ACPI daemon. Not sure whether this is essential.
|
|
||||||
services.acpid.enable = true;
|
|
||||||
|
|
||||||
boot.kernelModules =
|
boot.kernelModules =
|
||||||
[ "acpi_cpufreq" "powernow-k8" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
|
[ "acpi_cpufreq" "powernow-k8" "cpufreq_performance" "cpufreq_powersave" "cpufreq_ondemand"
|
||||||
"cpufreq_conservative"
|
"cpufreq_conservative"
|
||||||
|
|
|
@ -24,6 +24,11 @@ let
|
||||||
|
|
||||||
driverNames = config.hardware.opengl.videoDrivers;
|
driverNames = config.hardware.opengl.videoDrivers;
|
||||||
|
|
||||||
|
needsAcpid =
|
||||||
|
(elem "nvidia" driverNames) ||
|
||||||
|
(elem "nvidiaLegacy173" driverNames) ||
|
||||||
|
(elem "nvidiaLegacy304" driverNames);
|
||||||
|
|
||||||
drivers = flip map driverNames
|
drivers = flip map driverNames
|
||||||
(name: { inherit name; driverName = name; } //
|
(name: { inherit name; driverName = name; } //
|
||||||
attrByPath [name] (if (hasAttr ("xf86video" + name) xorg) then { modules = [(getAttr ("xf86video" + name) xorg) ]; } else throw "unknown video driver `${name}'") knownVideoDrivers);
|
attrByPath [name] (if (hasAttr ("xf86video" + name) xorg) then { modules = [(getAttr ("xf86video" + name) xorg) ]; } else throw "unknown video driver `${name}'") knownVideoDrivers);
|
||||||
|
@ -428,6 +433,8 @@ in
|
||||||
++ optional (elem "virtualbox" driverNames) xorg.xrefresh
|
++ optional (elem "virtualbox" driverNames) xorg.xrefresh
|
||||||
++ optional (elem "ati_unfree" driverNames) kernelPackages.ati_drivers_x11;
|
++ optional (elem "ati_unfree" driverNames) kernelPackages.ati_drivers_x11;
|
||||||
|
|
||||||
|
services.acpid.enable = mkIf needsAcpid true;
|
||||||
|
|
||||||
environment.pathsToLink =
|
environment.pathsToLink =
|
||||||
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
|
[ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ];
|
||||||
|
|
||||||
|
@ -436,7 +443,8 @@ in
|
||||||
systemd.services."display-manager" =
|
systemd.services."display-manager" =
|
||||||
{ description = "X11 Server";
|
{ description = "X11 Server";
|
||||||
|
|
||||||
after = [ "systemd-udev-settle.service" "local-fs.target" ];
|
after = [ "systemd-udev-settle.service" "local-fs.target" ]
|
||||||
|
++ optional needsAcpid "acpid.service";
|
||||||
|
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue