From 00a1828a0d15c5f970a0b327a39f47c5ea0eba6a Mon Sep 17 00:00:00 2001 From: Eclypsed Date: Sun, 9 Nov 2025 14:34:44 -0500 Subject: [PATCH] Added HyprDynamicMonitors --- flake.lock | 93 +++++++++++++++++++++++++++++----- flake.nix | 2 + modules/home/hypr/default.nix | 1 + modules/home/hypr/hyprland.nix | 9 +++- modules/home/hypr/monitors.nix | 19 +++++++ modules/system/packages.nix | 3 ++ modules/system/services.nix | 2 + 7 files changed, 115 insertions(+), 14 deletions(-) create mode 100644 modules/home/hypr/monitors.nix diff --git a/flake.lock b/flake.lock index 097104c..66a6125 100644 --- a/flake.lock +++ b/flake.lock @@ -275,6 +275,24 @@ "type": "github" } }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -400,6 +418,25 @@ "type": "github" } }, + "hyprdynamicmonitors": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1762458772, + "narHash": "sha256-PSIdziku8cdYQ27E4Xxn1Qgc9prerJDOqSV0CtQoC3k=", + "owner": "fiffeek", + "repo": "hyprdynamicmonitors", + "rev": "13fc7f0ce1e15ab96601a19a08e4ddd02ef7ced5", + "type": "github" + }, + "original": { + "owner": "fiffeek", + "repo": "hyprdynamicmonitors", + "type": "github" + } + }, "hyprgraphics": { "inputs": { "hyprutils": [ @@ -439,9 +476,9 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner_2", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": "systems_3", "xdph": "xdph" }, "locked": { @@ -684,7 +721,7 @@ "mango": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "scenefx": "scenefx" }, "locked": { @@ -734,11 +771,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762363567, - "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", + "lastModified": 1758690382, + "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", + "rev": "e643668fd71b949c53f8626614b21ff71a07379d", "type": "github" }, "original": { @@ -764,6 +801,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1762363567, + "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ae814fd3904b621d8ab97418f1d0f2eb0d3716f4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1750386251, "narHash": "sha256-1ovgdmuDYVo5OUC5NzdF+V4zx2uT8RtsgZahxidBTyw=", @@ -779,7 +832,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1762363567, "narHash": "sha256-YRqMDEtSMbitIMj+JLpheSz0pwEr0Rmy5mC7myl17xs=", @@ -849,7 +902,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1762353527, @@ -915,10 +968,11 @@ "inputs": { "agenix": "agenix", "home-manager": "home-manager_2", + "hyprdynamicmonitors": "hyprdynamicmonitors", "hyprland": "hyprland", "mango": "mango", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nur": "nur", "nvf": "nvf", "plasma-manager": "plasma-manager", @@ -980,7 +1034,7 @@ "nixpkgs" ], "nur": "nur_2", - "systems": "systems_4", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1017,6 +1071,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -1031,7 +1100,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1046,7 +1115,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index c5a7492..ce4f104 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,8 @@ url = "github:uiriansan/SilentSDDM"; inputs.nixpkgs.follows = "nixpkgs"; }; + + hyprdynamicmonitors.url = "github:fiffeek/hyprdynamicmonitors"; }; outputs = diff --git a/modules/home/hypr/default.nix b/modules/home/hypr/default.nix index d479140..7879259 100644 --- a/modules/home/hypr/default.nix +++ b/modules/home/hypr/default.nix @@ -5,5 +5,6 @@ imports = [ ./hyprland.nix ./keybinds.nix + ./monitors.nix ]; } diff --git a/modules/home/hypr/hyprland.nix b/modules/home/hypr/hyprland.nix index 3bb44b8..fecc906 100644 --- a/modules/home/hypr/hyprland.nix +++ b/modules/home/hypr/hyprland.nix @@ -1,5 +1,6 @@ { pkgs, + config, ... }: { @@ -14,10 +15,14 @@ portalPackage = null; settings = { - monitor = [ - "eDP-1, 2256x1504@60, 0x0, 1" + source = [ + "${config.xdg.configHome}/hypr/monitors.conf" ]; + # monitor = [ + # "eDP-1, 2256x1504@60, 0x0, 1" + # ]; + decoration = { rounding = 10; diff --git a/modules/home/hypr/monitors.nix b/modules/home/hypr/monitors.nix new file mode 100644 index 0000000..d4bc84f --- /dev/null +++ b/modules/home/hypr/monitors.nix @@ -0,0 +1,19 @@ +{ + inputs, + pkgs, + ... +}: +{ + imports = [ + inputs.hyprdynamicmonitors.homeManagerModules.default + ]; + + home.packages = [ + inputs.hyprdynamicmonitors.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; + + home.hyprdynamicmonitors = { + enable = true; + installExamples = false; + }; +} diff --git a/modules/system/packages.nix b/modules/system/packages.nix index 25daadf..ff2f5eb 100644 --- a/modules/system/packages.nix +++ b/modules/system/packages.nix @@ -37,5 +37,8 @@ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. git ]; + variables = { + EDITOR = "vim"; + }; }; } diff --git a/modules/system/services.nix b/modules/system/services.nix index 1f9b4a0..59fb441 100644 --- a/modules/system/services.nix +++ b/modules/system/services.nix @@ -49,6 +49,8 @@ # media-session.enable = true; }; + upower.enable = true; + # Enable the OpenSSH daemon. (Look into Fail2Ban in the future) openssh = { enable = true;