2019-05-04 13:47:21 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.machine;
|
|
|
|
ifelse = a: b: c: if a then b else c;
|
|
|
|
in mkIf (elem "desktop" cfg.services) {
|
|
|
|
programs.sway = mkIf (elem "sway" cfg.desktop.wms) # (import ./desktop/sway.nix { inherit pkgs; });
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
file i3status dmenu
|
|
|
|
qt5.qtwayland
|
|
|
|
grim slurp
|
|
|
|
swaylock
|
|
|
|
swayidle
|
|
|
|
light
|
|
|
|
mako
|
|
|
|
wl-clipboard
|
|
|
|
wf-recorder
|
|
|
|
];
|
|
|
|
extraSessionCommands = ''
|
|
|
|
export GDK_BACKEND=wayland
|
|
|
|
export CLUTTER_BACKEND=wayland
|
|
|
|
export SDL_VIDEODRIVER=wayland
|
|
|
|
# needs qt5.qtwayland in systemPackages
|
|
|
|
export QT_QPA_PLATFORM=wayland-egl
|
|
|
|
export QT_WAYLAND_FORCE_DPI=physical
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
|
|
# Fix for some Java AWT applications (e.g. Android Studio),
|
|
|
|
# use this if they aren't displayed properly:
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2019-09-05 15:24:54 +02:00
|
|
|
services.gvfs.enable = true;
|
2019-05-04 13:47:21 +02:00
|
|
|
services.xserver = {
|
|
|
|
enable = !(elem "sway" cfg.desktop.wms);
|
|
|
|
layout = "de";
|
2019-12-26 01:00:46 +01:00
|
|
|
displayManager.defaultSession = ifelse (cfg.desktop.wms != []) (elemAt cfg.desktop.wms 0) null;
|
2019-05-04 13:47:21 +02:00
|
|
|
windowManager = mkIf (cfg.desktop.wms != []) {
|
|
|
|
i3 = mkIf (elem "i3" cfg.desktop.wms) (import ./desktop/i3.nix { inherit pkgs; });
|
|
|
|
};
|
|
|
|
libinput = {
|
|
|
|
enable = true;
|
2021-10-28 09:50:49 +02:00
|
|
|
touchpad = {
|
|
|
|
tapping = true;
|
|
|
|
disableWhileTyping = false;
|
|
|
|
naturalScrolling = false;
|
|
|
|
horizontalScrolling = true;
|
|
|
|
};
|
2019-05-04 13:47:21 +02:00
|
|
|
};
|
|
|
|
};
|
2021-10-28 09:46:12 +02:00
|
|
|
machine.pkgsets.python3.pkgs = with pkgs.gitpkgs.python38Packages; [ py3status pytz tzlocal ];
|
2019-05-04 13:47:21 +02:00
|
|
|
}
|