feat(hypr): switch from swaylock to hyprlock
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-03-03 17:18:59 -05:00
parent a13b221e49
commit 477ef7759a
6 changed files with 120 additions and 68 deletions

View file

@ -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);
};
}

View file

@ -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=",

View file

@ -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 = {

View file

@ -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 = ''<span foreground="##cccccc" style="italic">Input Password...</span>'';
}
];
labels = [
{
inherit monitor;
text = "<i> Groovy </i>";
font_family = "Ubuntu Mono";
}
];
};
}

View file

@ -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
];

View file

@ -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";
};
};
}