diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2014-05-02 14:32:47 +0400 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2014-05-02 14:32:47 +0400 |
commit | eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4 (patch) | |
tree | f97eab6a6aeb0a587156e054b23d46b0cd7538c8 /nixos/modules/hardware/video/bumblebee.nix | |
parent | de26954b3058868f55075d4d723cab26dfe49832 (diff) | |
download | nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar.gz nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar.bz2 nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar.lz nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar.xz nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.tar.zst nixlib-eef9a8ac2a30b495ff7184382ed0dbd73b3b88e4.zip |
On my system OpenGL with bumblebee seems to require libudev in LD_LIBRARY_PATH. Fix that, fix bumblebee module loading and make the socket group configurable
Diffstat (limited to 'nixos/modules/hardware/video/bumblebee.nix')
-rw-r--r-- | nixos/modules/hardware/video/bumblebee.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix index f06139adc445..52dea798f87a 100644 --- a/nixos/modules/hardware/video/bumblebee.nix +++ b/nixos/modules/hardware/video/bumblebee.nix @@ -17,6 +17,12 @@ with lib; Only nvidia driver is supported so far. ''; }; + hardware.bumblebee.group = mkOption { + default = "wheel"; + example = "video"; + type = types.uniq types.str; + description = ''Group for bumblebee socket''; + }; }; config = mkIf config.hardware.bumblebee.enable { @@ -29,13 +35,15 @@ with lib; systemd.services.bumblebeed = { description = "Bumblebee Hybrid Graphics Switcher"; wantedBy = [ "display-manager.service" ]; - script = "bumblebeed --use-syslog"; + script = "bumblebeed --use-syslog -g ${config.hardware.bumblebee.group}"; path = [ kernel.bbswitch pkgs.bumblebee ]; serviceConfig = { Restart = "always"; RestartSec = 60; CPUSchedulingPolicy = "idle"; }; + environment.LD_LIBRARY_PATH="/run/opengl-driver/lib/"; + environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/"; }; }; } |