diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-11-03 14:19:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 14:19:41 +0800 |
commit | 8bddbbaf849f83285e0844be1ec6fb92e6343dfd (patch) | |
tree | d05cc5371e1fe37637233b3ca24c1e99cf90c1a8 /nixos | |
parent | 4bff595c1c334f075316b179bcdbf4a1944d132b (diff) | |
parent | d936b17d144ee2a479e5288e6f90bc8725fc33d1 (diff) |
Merge pull request #72404 from peterhoeg/u/displaylink
displaylink: make it work!
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/video/displaylink.nix | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/nixos/modules/hardware/video/displaylink.nix b/nixos/modules/hardware/video/displaylink.nix index 669ac849cbad0..912f53da836a8 100644 --- a/nixos/modules/hardware/video/displaylink.nix +++ b/nixos/modules/hardware/video/displaylink.nix @@ -19,6 +19,21 @@ in config = mkIf enabled { boot.extraModulePackages = [ evdi ]; + boot.kernelModules = [ "evdi" ]; + + environment.etc."X11/xorg.conf.d/40-displaylink.conf".text = '' + Section "OutputClass" + Identifier "DisplayLink" + MatchDriver "evdi" + Driver "modesetting" + Option "AccelMethod" "none" + EndSection + ''; + + # make the device available + services.xserver.displayManager.sessionCommands = '' + ${lib.getBin pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource 1 0 + ''; # Those are taken from displaylink-installer.sh and from Arch Linux AUR package. @@ -47,18 +62,13 @@ in description = "DisplayLink Manager Service"; after = [ "display-manager.service" ]; conflicts = [ "getty@tty7.service" ]; - path = [ pkgs.kmod ]; serviceConfig = { ExecStart = "${displaylink}/bin/DisplayLinkManager"; Restart = "always"; RestartSec = 5; + LogsDirectory = "displaylink"; }; - - preStart = '' - mkdir -p /var/log/displaylink - modprobe evdi - ''; }; }; |