nichts/hosts/vali/mars/i3.nix

28 lines
850 B
Nix
Raw Normal View History

2024-04-10 20:46:23 +02:00
{ pkgs, lib, config, callPackage, ... }:
with lib; let
cfg = config.myOptions.programs.i3;
in {
options.myOptions.programs.i3.enable = mkEnableOption "i3";
2024-04-10 19:42:28 +02:00
2024-04-10 20:46:23 +02:00
config = mkIf cfg.enable {
2024-04-10 19:42:28 +02:00
services.xserver = {
enable = true;
2024-04-12 14:41:59 +02:00
xkb.layout = "de";
windowManager = {
i3.enable = true;
2024-04-10 19:42:28 +02:00
};
displayManager = {
gdm.enable = true;
defaultSession = "none+i3";
2024-04-12 20:24:19 +02:00
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
2024-04-10 19:42:28 +02:00
};
};
};
}