nichts/hosts/vali/mars/i3.nix
2024-04-12 20:24:19 +02:00

27 lines
850 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ pkgs, lib, config, callPackage, ... }:
with lib; let
cfg = config.myOptions.programs.i3;
in {
options.myOptions.programs.i3.enable = mkEnableOption "i3";
config = mkIf cfg.enable {
services.xserver = {
enable = true;
xkb.layout = "de";
windowManager = {
i3.enable = true;
};
displayManager = {
gdm.enable = true;
defaultSession = "none+i3";
setupCommands = ''
LEFT='DP-2'
CENTER='HDMI-1'
RIGHT='HDMI-0'
${pkgs.xorg.xrandr}/bin/xrandr --output $CENTER --rotate left --output $LEFT --rotate left --left-of $CENTER --output $RIGHT --right-of $CENTER
'';
# xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1
};
};
};
}