diff --git a/blueplum.nix b/blueplum.nix index b51fd62..2fef259 100644 --- a/blueplum.nix +++ b/blueplum.nix @@ -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" - ] + ]}" ]; } diff --git a/home.nix b/home.nix index cef54ff..ff8b823 100644 --- a/home.nix +++ b/home.nix @@ -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 diff --git a/home/i3.nix b/home/i3.nix index ac64807..0aa1b74 100644 --- a/home/i3.nix +++ b/home/i3.nix @@ -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 "";