Monitor specific configs in hosts

This commit is contained in:
2025-04-15 17:48:57 +02:00
parent 980334b44b
commit 4a884f5e6e
12 changed files with 63 additions and 65 deletions

4
hosts/desktop/common.nix Normal file
View File

@ -0,0 +1,4 @@
{
monitor1 = "DP-1";
monitor2 = "DP-3";
}

View File

@ -6,6 +6,8 @@
{
imports = [
(lib.custom.relativeToRoot "shared/home-manager")
./hyprpaper.nix
./settings.nix
];
programs.git.signing.key = "706F53DD087A91DE";

View File

@ -0,0 +1,29 @@
# Wallpapers
{
lib,
theme,
...
}:
{
services.hyprpaper.settings =
let
wallpaper1 = builtins.toString theme.wallpaper.monitor1;
wallpaper2 = builtins.toString theme.wallpaper.monitor2;
in
{
preload = lib.mkDefault [
wallpaper1
wallpaper2
];
wallpaper =
let
common = import ../common.nix;
in
lib.mkDefault [
"${common.monitor1},${wallpaper1}"
"${common.monitor2},${wallpaper2}"
];
};
}

View File

@ -0,0 +1,12 @@
{ lib, ... }:
{
wayland.windowManager.hyprland.settings.monitor =
let
common = import ../common.nix;
in
lib.mkForce [
"${common.monitor1}, 3440x1440@175, 0x0, 1"
"${common.monitor2}, 3840x2160@60, 3440x0, 1.5, transform, 1"
];
}

View File

@ -1,25 +1,4 @@
rec {
default = {
browser = "zen";
calculator = "gnome-calculator";
fileManager = "nautilus";
imageViewer = "loupe";
lockScreen = "hyprlock";
terminal = "kitty";
};
dir = {
home = "/home/${username}";
pictures = "${dir.home}/Pictures";
};
keymaps = {
layout = "gb,no";
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
};
# Empty matches all
{
# Empty matches all monitors
monitor1 = "";
username = "martin";
}

View File

@ -1,23 +0,0 @@
# Wallpapers
{
lib,
theme,
common,
...
}:
{
services.hyprpaper.settings =
let
monitor1 = builtins.toString theme.wallpaper.monitor1;
in
{
preload = lib.mkDefault [
monitor1
];
wallpaper = lib.mkDefault [
"${common.monitor1},${monitor1}"
];
};
}

View File

@ -1,14 +1,17 @@
{
lib,
common,
...
}:
{
wayland.windowManager.hyprland.settings = {
monitor = lib.mkDefault [
"${common.monitor1}, 1920x1080@60.05, 0x0, 1"
];
monitor =
let
common = import ../common.nix;
in
lib.mkForce [
"${common.monitor1}, 1920x1080@60.05, 0x0, 1"
];
# Autostart
exec-once = [