snowhawk: move monitor config to hardware
parent
217f09f7ef
commit
a87f8feb1a
|
@ -1,5 +1,40 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
default-monitors = pkgs.writeXrandrScriptBin "default-monitors" {
|
||||
DP-0 = {
|
||||
primary = true;
|
||||
mode = "1920x1080";
|
||||
pos = "1920x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-0 = {
|
||||
mode = "1920x1080";
|
||||
pos = "0x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
};
|
||||
|
||||
tv-on = pkgs.writeXrandrScriptBin "tv-on" {
|
||||
DP-0 = {
|
||||
primary = true;
|
||||
mode = "1920x1080";
|
||||
pos = "1920x1080";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-0 = {
|
||||
mode = "1920x1080";
|
||||
pos = "0x1080";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-1 = {
|
||||
mode = "1920x1080";
|
||||
pos = "1920x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
|
@ -38,21 +73,13 @@
|
|||
services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ];
|
||||
services.xserver.dpi = lib.mkDefault 96;
|
||||
|
||||
environment.systemPackages = [
|
||||
default-monitors
|
||||
tv-on
|
||||
];
|
||||
|
||||
systemd.user.services.screenlayout = {
|
||||
script = lib.getExe
|
||||
(pkgs.writeXrandrScriptBin "default-monitors" {
|
||||
DP-0 = {
|
||||
primary = true;
|
||||
mode = "1920x1080";
|
||||
pos = "1920x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-0 = {
|
||||
mode = "1920x1080";
|
||||
pos = "0x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
});
|
||||
script = lib.getExe default-monitors;
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
|
|
@ -70,25 +70,6 @@
|
|||
systemctl suspend
|
||||
'')
|
||||
|
||||
(writeXrandrScriptBin "tv-on" {
|
||||
DP-0 = {
|
||||
primary = true;
|
||||
mode = "1920x1080";
|
||||
pos = "1920x1080";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-0 = {
|
||||
mode = "1920x1080";
|
||||
pos = "0x1080";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-1 = {
|
||||
mode = "1920x1080";
|
||||
pos = "1920x0";
|
||||
rotate = "normal";
|
||||
};
|
||||
})
|
||||
|
||||
feh
|
||||
imagemagick
|
||||
uhk-agent
|
||||
|
|
Loading…
Reference in New Issue