1
0

patch: properly configure screen configuration

(post `greetd` introduction)
This commit is contained in:
2025-12-19 16:15:27 +01:00
parent 049c916f46
commit 7acae9b431
3 changed files with 20 additions and 16 deletions

View File

@@ -6,7 +6,7 @@
}:
let
concat = strings: lib.concatStringsSep " " strings;
concat = strings: builtins.concatStringsSep " " strings;
in
{
services.xserver.videoDrivers = [ "nvidia" ];
@@ -21,22 +21,20 @@ in
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
services.xserver.displayManager.setupCommands = concat [
home-manager.users.anton.xsession.profileExtra = concat [
"${lib.getExe pkgs.xorg.xrandr}"
concat
[
"--output DP-0"
"${concat [
"--output DP-2"
"--mode 1920x1080"
"--pos 0x0"
"--rate 144"
"--primary"
]
concat
[
]}"
"${concat [
"--output HDMI-0"
"--mode 1920x1080"
"--pos 1920x0"
"--rate 144"
]
]}"
];
}

View File

@@ -8,7 +8,7 @@ let
neovim = pkgs.callPackage ./pkgs/neovim/default.nix { };
fish = pkgs.callPackage ./pkgs/fish/default.nix { };
env = import ./.env.nix;
env = import ./.env.nix { inherit pkgs; };
home = /home/anton;
in

View File

@@ -56,8 +56,8 @@ in
let
background = lib.concatStringsSep " " [
"exec --no-startup-id"
"${lib.concatStringsSep " " [
"${lib.getExe pkgs.xwinwrap}"
(lib.concatStringsSep " " [
(lib.getExe pkgs.xwinwrap)
"-g 3820x1080"
"-s"
"-b"
@@ -65,10 +65,10 @@ in
"-sp"
"-ov"
"-nf"
]}"
])
"--"
"${lib.concatStringsSep " " [
"${lib.getExe pkgs.mpv}"
(lib.concatStringsSep " " [
(lib.getExe pkgs.mpv)
"${wallpaper}/wallpaper.mov"
"-wid WID"
"--loop"
@@ -81,7 +81,7 @@ in
"--framedrop=vo"
"--profile=low-latency"
"--hwdec=auto"
]}"
])
];
displays =
if (env ? displays) then
@@ -89,6 +89,12 @@ in
"workspace 1 output ${env.displays.primary}"
(if (env.displays ? secondary) then "workspace 2 output ${env.displays.secondary}" else "")
"exec i3-msg focus output ${env.displays.primary}"
(
if (env.displays ? xrandr) then
"exec \"${lib.getExe pkgs.xorg.xrandr} ${env.displays.xrandr}\""
else
""
)
]
else
"";