summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home-manager/hypr/config/monitors.lua29
-rw-r--r--home-manager/hypr/hosts/default.lua2
-rw-r--r--home-manager/hypr/hosts/laptop.lua1
-rw-r--r--home-manager/hypr/hosts/phosphophyllite.lua28
-rw-r--r--home-manager/hypr/hyprland.lua1
-rw-r--r--home-manager/modules/hyprland.nix11
6 files changed, 43 insertions, 29 deletions
diff --git a/home-manager/hypr/config/monitors.lua b/home-manager/hypr/config/monitors.lua
index 883ed6b..c56e64b 100644
--- a/home-manager/hypr/config/monitors.lua
+++ b/home-manager/hypr/config/monitors.lua
@@ -1,28 +1 @@
-hl.monitor({
- output = "DP-2",
- mode = "2560x1440@144",
- position = "0x0",
- scale = 1
-})
-hl.monitor({
- output = "HDMI-A-1",
- mode = "1920x1080@60",
- position = "2560x0",
- scale = 1,
- transform= 3
-})
-
-
-hl.config({
- master = {
- mfact = 0.60, -- Master window takes 65%, stack takes 35%
- orientation = "top" -- Master on left, stack on right
- }
-})
-
-hl.workspace_rule({ workspace = "10", monitor = "HDMI-A-1", default = true, layout = "master" })
-hl.workspace_rule({ workspace = "9", monitor = "HDMI-A-1"})
-
-hl.window_rule({ match = { class = "discord" }, workspace = "10" })
-hl.window_rule({ match = { class = "vesktop" }, workspace = "10" })
-hl.window_rule({ match = { class = "Spotify" }, workspace = "10" })
+hl.monitor({ output = ",preferred,auto,1" })
diff --git a/home-manager/hypr/hosts/default.lua b/home-manager/hypr/hosts/default.lua
new file mode 100644
index 0000000..eff8e67
--- /dev/null
+++ b/home-manager/hypr/hosts/default.lua
@@ -0,0 +1,2 @@
+-- Default host overrides for Hyprland.
+-- Keep this minimal and host-agnostic.
diff --git a/home-manager/hypr/hosts/laptop.lua b/home-manager/hypr/hosts/laptop.lua
new file mode 100644
index 0000000..e600d44
--- /dev/null
+++ b/home-manager/hypr/hosts/laptop.lua
@@ -0,0 +1 @@
+hl.monitor({ output = "eDP-1,preferred,auto,1" })
diff --git a/home-manager/hypr/hosts/phosphophyllite.lua b/home-manager/hypr/hosts/phosphophyllite.lua
new file mode 100644
index 0000000..478a4fe
--- /dev/null
+++ b/home-manager/hypr/hosts/phosphophyllite.lua
@@ -0,0 +1,28 @@
+hl.monitor({
+ output = "DP-2",
+ mode = "2560x1440@144",
+ position = "0x0",
+ scale = 1,
+})
+
+hl.monitor({
+ output = "HDMI-A-1",
+ mode = "1920x1080@60",
+ position = "2560x0",
+ scale = 1,
+ transform = 3,
+})
+
+hl.config({
+ master = {
+ mfact = 0.60,
+ orientation = "top",
+ },
+})
+
+hl.workspace_rule({ workspace = "10", monitor = "HDMI-A-1", default = true, layout = "master" })
+hl.workspace_rule({ workspace = "9", monitor = "HDMI-A-1" })
+
+hl.window_rule({ match = { class = "discord" }, workspace = "10" })
+hl.window_rule({ match = { class = "vesktop" }, workspace = "10" })
+hl.window_rule({ match = { class = "Spotify" }, workspace = "10" })
diff --git a/home-manager/hypr/hyprland.lua b/home-manager/hypr/hyprland.lua
index ccb5ac2..9741363 100644
--- a/home-manager/hypr/hyprland.lua
+++ b/home-manager/hypr/hyprland.lua
@@ -2,5 +2,6 @@ require("config/variables")
require("config/env")
require("config/autostart")
require("config/monitors")
+require("host")
require("config/settings")
require("config/keybinds")
diff --git a/home-manager/modules/hyprland.nix b/home-manager/modules/hyprland.nix
index 2316bd5..c2b46b9 100644
--- a/home-manager/modules/hyprland.nix
+++ b/home-manager/modules/hyprland.nix
@@ -1,6 +1,15 @@
-{ ... }: {
+{ osConfig, ... }:
+let
+ host = osConfig.networking.hostName;
+ hostFile = ../hypr/hosts + "/${host}.lua";
+in {
xdg.configFile."hypr" = {
source = ../hypr;
recursive = true;
};
+
+ xdg.configFile."hypr/host.lua".source =
+ if builtins.pathExists hostFile
+ then hostFile
+ else ../hypr/hosts/default.lua;
}