diff --git a/devices/wim/modules/security.nix b/devices/wim/modules/security.nix
index 04d1545a..9af7762f 100644
--- a/devices/wim/modules/security.nix
+++ b/devices/wim/modules/security.nix
@@ -34,5 +34,6 @@ in {
sudo.text = mkDefault (mkBefore grosshackConf);
login.text = mkDefault (mkBefore grosshackConf);
polkit-1.text = mkDefault (mkBefore grosshackConf);
+ hyprlock.text = mkDefault (mkBefore grosshackConf);
};
}
diff --git a/flake.lock b/flake.lock
index 0f7fe197..b4fefd89 100644
--- a/flake.lock
+++ b/flake.lock
@@ -284,7 +284,7 @@
},
"flake-utils_3": {
"inputs": {
- "systems": "systems_5"
+ "systems": "systems_6"
},
"locked": {
"lastModified": 1709126324,
@@ -587,6 +587,49 @@
"type": "github"
}
},
+ "hyprlang_3": {
+ "inputs": {
+ "nixpkgs": [
+ "hyprlock",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1708212860,
+ "narHash": "sha256-nW3Zrhh9RJcMTvOcXAaKADnJM/g6tDf3121lJtTHnYo=",
+ "owner": "hyprwm",
+ "repo": "hyprlang",
+ "rev": "11d5ccda071c153dfdc18ef65338956a51cef96a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hyprwm",
+ "repo": "hyprlang",
+ "type": "github"
+ }
+ },
+ "hyprlock": {
+ "inputs": {
+ "hyprlang": "hyprlang_3",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "systems": "systems_5"
+ },
+ "locked": {
+ "lastModified": 1709432852,
+ "narHash": "sha256-wqsfM53Lpx0+uFg5M66OWKkNtDIV3kKYkpymgw4r6U0=",
+ "owner": "hyprwm",
+ "repo": "hyprlock",
+ "rev": "f9fe60c7eb66c3a5e6ef56b66697de569a8479f4",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hyprwm",
+ "repo": "hyprlock",
+ "type": "github"
+ }
+ },
"lib-aggregate": {
"inputs": {
"flake-utils": "flake-utils_3",
@@ -1295,6 +1338,7 @@
"hyprgrass": "hyprgrass",
"hypridle": "hypridle",
"hyprland": "hyprland",
+ "hyprlock": "hyprlock",
"modernx-src": "modernx-src",
"nh": "nh",
"nix-gaming": "nix-gaming",
@@ -1456,6 +1500,21 @@
}
},
"systems_5": {
+ "locked": {
+ "lastModified": 1689347949,
+ "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default-linux",
+ "type": "github"
+ }
+ },
+ "systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
diff --git a/flake.nix b/flake.nix
index 1fa1c58d..31dcbb51 100644
--- a/flake.nix
+++ b/flake.nix
@@ -210,6 +210,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};
+ hyprlock = {
+ type = "github";
+ owner = "hyprwm";
+ repo = "hyprlock";
+
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
# FIXME: https://github.com/horriblename/hyprgrass/issues/76
hyprgrass = {
diff --git a/modules/hyprland/hyprlock.nix b/modules/hyprland/hyprlock.nix
new file mode 100644
index 00000000..a57f59fd
--- /dev/null
+++ b/modules/hyprland/hyprlock.nix
@@ -0,0 +1,48 @@
+{
+ config,
+ hyprlock,
+ lib,
+ ...
+}: let
+ inherit (lib) optionalString;
+ inherit (config.vars) mainMonitor;
+
+ monitor = optionalString (mainMonitor != null) mainMonitor;
+in {
+ imports = [hyprlock.homeManagerModules.default];
+
+ programs.hyprlock = {
+ enable = true;
+ general = {
+ hide_cursor = false;
+ };
+
+ backgrounds = [
+ {
+ path = "screenshot";
+ blur_size = 5;
+ blur_passes = 2;
+ vibrancy_darkness = 0.0;
+ }
+ ];
+
+ input-fields = [
+ {
+ inherit monitor;
+ fade_on_empty = false;
+ outer_color = "rgba(10, 10, 10, 1.0)";
+ inner_color = "rgb(151515)";
+ font_color = "rgba(240, 240, 240, 1.0)"; # This is the dot color
+ placeholder_text = ''Input Password...'';
+ }
+ ];
+
+ labels = [
+ {
+ inherit monitor;
+ text = " Groovy ";
+ font_family = "Ubuntu Mono";
+ }
+ ];
+ };
+}
diff --git a/modules/hyprland/security.nix b/modules/hyprland/security.nix
index f284aa4d..8f42b78d 100644
--- a/modules/hyprland/security.nix
+++ b/modules/hyprland/security.nix
@@ -14,7 +14,7 @@ in {
../greetd
];
- security.pam.services.swaylock = {};
+ security.pam.services.hyprlock = {};
services.gnome.gnome-keyring.enable = true;
home-manager.users.${mainUser} = let
@@ -23,16 +23,16 @@ in {
name = "lock";
runtimeInputs = [
hmCfg.programs.ags.finalPackage
- hmCfg.programs.swaylock.package
+ hmCfg.programs.hyprlock.package
];
text = ''
ags -r 'Tablet.setLaptopMode()'
- swaylock -C ${hmCfg.xdg.configHome}/swaylock/config
+ hyprlock
'';
};
in {
imports = [
- ./swaylock.nix
+ ./hyprlock.nix
hypridle.homeManagerModules.default
];
diff --git a/modules/hyprland/swaylock.nix b/modules/hyprland/swaylock.nix
deleted file mode 100644
index 68dd2a33..00000000
--- a/modules/hyprland/swaylock.nix
+++ /dev/null
@@ -1,63 +0,0 @@
-{pkgs, ...}: {
- programs.swaylock = {
- enable = true;
- package = pkgs.swaylock-effects;
- settings = {
- font = "Ubuntu";
-
- clock = true;
- timestr = "%R";
- datestr = "%a, %e of %B";
-
- screenshots = true;
-
- # FIXME: doesn't work
- submit-on-touch = true;
-
- # Very delayed for some reason
- #fade-in = 0.1;
-
- effect-blur = "20x2";
- #effect-greyscale = true;
- #effect-scale = 0.3;
-
- indicator = true;
- indicator-radius = 240;
- indicator-thickness = 20;
- indicator-caps-lock = true;
-
- key-hl-color = "880033";
-
- separator-color = "00000000";
-
- inside-color = "00000099";
- inside-clear-color = "ffd20400";
- inside-caps-lock-color = "009ddc00";
- inside-ver-color = "d9d8d800";
- inside-wrong-color = "ee2e2400";
-
- ring-color = "231f20D9";
- ring-clear-color = "231f20D9";
- ring-caps-lock-color = "231f20D9";
- ring-ver-color = "231f20D9";
- ring-wrong-color = "231f20D9";
-
- line-color = "00000000";
- line-clear-color = "ffd204FF";
- line-caps-lock-color = "009ddcFF";
- line-ver-color = "d9d8d8FF";
- line-wrong-color = "ee2e24FF";
-
- text-color = "CBA6F7FF";
- text-clear-color = "ffd20400";
- text-ver-color = "d9d8d800";
- text-wrong-color = "ee2e2400";
-
- bs-hl-color = "ee2e24FF";
- caps-lock-key-hl-color = "ffd204FF";
- caps-lock-bs-hl-color = "ee2e24FF";
- disable-caps-lock-text = true;
- text-caps-lock-color = "009ddc";
- };
- };
-}