From 7b6861f77b8d918c1a79cc3521807d7d9bb68ac0 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Thu, 21 Aug 2025 13:20:21 +0200 Subject: [PATCH] hyprlock: fix mesa mismatch and adjust display names --- flake.lock | 60 +++++-------------- flake.nix | 11 +++- .../nixos/desktop/addons/hyprlock/default.nix | 25 +++++--- 3 files changed, 42 insertions(+), 54 deletions(-) diff --git a/flake.lock b/flake.lock index c600672..038de0b 100644 --- a/flake.lock +++ b/flake.lock @@ -652,7 +652,9 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs-unstable" + ], "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" @@ -858,7 +860,9 @@ "hyprlang": "hyprlang_2", "hyprutils": "hyprutils_2", "hyprwayland-scanner": "hyprwayland-scanner_2", - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixpkgs-unstable" + ], "systems": "systems_2" }, "locked": { @@ -1172,11 +1176,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1755754236, - "narHash": "sha256-LG7awtagiLLsgoCkdAaRNSvHBCUg/OIIGdR4VTcEqdw=", + "lastModified": 1755774224, + "narHash": "sha256-ZwDIotyDUko1Nrs9kmu/XJiMLPxQvrMrPEppwJn9yeI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "890c81f5152d9fc33188dc5cc427fbaa1cdb99e2", + "rev": "d61b5c2c357226d07bb72ff2abad478a9a168d43", "type": "github" }, "original": { @@ -1219,38 +1223,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1754725699, - "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1751011381, - "narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1755615617, "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", @@ -1266,7 +1238,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_3": { "locked": { "lastModified": 1753939845, "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", @@ -1282,7 +1254,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_4": { "locked": { "lastModified": 1744868846, "narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=", @@ -1298,7 +1270,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_5": { "locked": { "lastModified": 1755615617, "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", @@ -1384,7 +1356,7 @@ "nix-ld": "nix-ld", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_2", "nixpkgs-latest-factorio": "nixpkgs-latest-factorio", "nixpkgs-master": "nixpkgs-master", "nixpkgs-tuya-vacuum": "nixpkgs-tuya-vacuum", @@ -1561,7 +1533,7 @@ "blobs": "blobs", "flake-compat": "flake-compat_4", "git-hooks": "git-hooks_2", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_3", "nixpkgs-25_05": "nixpkgs-25_05" }, "locked": { @@ -1602,7 +1574,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1754988908, @@ -1751,7 +1723,7 @@ "zen-browser": { "inputs": { "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1755745641, diff --git a/flake.nix b/flake.nix index 87879c8..a58f282 100644 --- a/flake.nix +++ b/flake.nix @@ -35,13 +35,18 @@ ### # hyprland stuff - hyprland.url = "github:hyprwm/Hyprland"; - hyprlock.url = "github:hyprwm/hyprlock"; + hyprland = { + url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + hyprlock = { + url = "github:hyprwm/hyprlock"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; - hy3 = { url = "github:outfoxxed/hy3"; inputs.hyprland.follows = "hyprland"; diff --git a/modules/nixos/desktop/addons/hyprlock/default.nix b/modules/nixos/desktop/addons/hyprlock/default.nix index f896207..65f1273 100644 --- a/modules/nixos/desktop/addons/hyprlock/default.nix +++ b/modules/nixos/desktop/addons/hyprlock/default.nix @@ -13,7 +13,7 @@ let hyprlock-package = inputs.hyprlock.packages.${system}.hyprlock; hyprlock-blur = pkgs.writeShellScriptBin "hyprlock-blur" '' - ${pkgs.grim}/bin/grim -o DP-2 -l 0 /tmp/screenshot1.png & + ${pkgs.grim}/bin/grim -o DP-1 -l 0 /tmp/screenshot1.png & ${pkgs.grim}/bin/grim -o HDMI-A-1 -l 0 /tmp/screenshot2.png & wait && hyprlock @@ -29,7 +29,14 @@ in }; config = mkIf cfg.enable { - security.pam.services.hyprlock = { }; + security.pam.services.hyprlock = { + allowNullPassword = false; + startSession = false; + text = '' + auth include login + account include login + ''; + }; environment.systemPackages = [ hyprlock-blur ]; @@ -48,7 +55,7 @@ in # inspiration from https://github.com/justinmdickey/publicdots/blob/main/.config/hypr/hyprlock.conf background = [ { - monitor = "DP-2"; + monitor = "DP-1"; path = "/tmp/screenshot1.png"; blur_passes = 1; # 0 disables blurring @@ -67,7 +74,7 @@ in label = [ { - monitor = "DP-2"; + monitor = "DP-1"; text = "$TIME"; color = "rgba(242, 243, 244, 0.75)"; font_size = 95; @@ -78,7 +85,7 @@ in } { - monitor = "DP-2"; + monitor = "DP-1"; text = ''cmd[update:1000] echo $(date +"%A, %B %d")''; color = "rgba(242, 243, 244, 0.75)"; font_size = 22; @@ -91,7 +98,7 @@ in ]; image = { - monitor = "DP-2"; + monitor = "DP-1"; path = "/home/${username}/Pictures/profile.png"; position = "0, 50"; @@ -100,7 +107,7 @@ in }; input-field = { - monitor = "DP-2"; + monitor = "DP-1"; size = "200,50"; outline_thickness = 2; dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8 @@ -118,6 +125,10 @@ in halign = "center"; valign = "center"; }; + + general = { + auth_method = "pam"; + }; }; }; };