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

View File

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

View File

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