diff --git a/configuration.nix b/configuration.nix
index 7152e7d..167d41a 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -44,6 +44,13 @@
NIXOS_CONFIG_PATH = "/etc/nixos";
};
+ fonts = {
+ fontconfig.enable = true;
+ packages = with pkgs; [
+ nerd-fonts.jetbrains-mono
+ ];
+ };
+
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
diff --git a/home/default.nix b/home/default.nix
index 080c2fe..0cfcee7 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -42,9 +42,6 @@ in
enable = true;
settings = (with builtins; fromTOML (readFile ./starship.toml)) // { };
};
-
- # Lock desktop
- swaylock.enable = true;
};
services = {
diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix
index 6dbf31a..03ae236 100644
--- a/home/hyprland/default.nix
+++ b/home/hyprland/default.nix
@@ -6,6 +6,7 @@
./hyprcursor
./waybar
./hypridle
+ ./hyprlock
];
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
diff --git a/home/hyprland/hyprland.conf b/home/hyprland/hyprland.conf
index 0770fc6..a7be463 100644
--- a/home/hyprland/hyprland.conf
+++ b/home/hyprland/hyprland.conf
@@ -301,7 +301,7 @@ bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, B, exec, $browser
-bind = $mainMod, L, exec, swaylock & disown
+bind = $mainMod, L, exec, hyprlock
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
diff --git a/home/hyprland/hyprlock/default.nix b/home/hyprland/hyprlock/default.nix
new file mode 100644
index 0000000..cf4cfd6
--- /dev/null
+++ b/home/hyprland/hyprlock/default.nix
@@ -0,0 +1,95 @@
+{ lib, ... }:
+
+{
+ home.file.".face.png".source = ./face.png;
+ # TODO style face and wallpaper
+ programs.hyprlock = {
+ enable = true;
+ settings = {
+ "$base" = "rgb(1e1e2e)";
+ "$text" = "rgb(cdd6f4)";
+ "$textAlpha" = "cdd6f4";
+ "$mauve" = "rgb(cba6f7)";
+ "$mauveAlpha" = "cba6f7";
+ "$red" = "rgb(f38ba8)";
+ "$yellow" = "rgb(f9e2af)";
+ "$accent" = "$mauve";
+ "$accentAlpha" = "$mauveAlpha";
+ "$surface0" = "rgb(313244)";
+ "$font" = "JetBrainsMono Nerd Font";
+
+ # GENERAL
+ general = {
+ disable_loading_bar = true;
+ hide_cursor = true;
+ };
+
+ # LAYOUT
+ label = [
+ {
+ text = "$LAYOUT";
+ color = "$text";
+ font_size = 25;
+ font_family = "$font";
+ position = "30, -30";
+ halign = "left";
+ valign = "top";
+ }
+
+ # TIME
+ {
+ text = "$TIME";
+ color = "$text";
+ font_size = 90;
+ font_family = "$font";
+ position = "-30, 0";
+ halign = "right";
+ valign = "top";
+ }
+
+ # DATE
+ {
+ text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
+ color = "$text";
+ font_size = 25;
+ font_family = "$font";
+ position = "-30, -150";
+ halign = "right";
+ valign = "top";
+ }
+ ];
+
+ # USER AVATAR
+ image = {
+ path = "~/.face.png";
+ size = 100;
+ border_color = "$accent";
+ position = "0, 75";
+ halign = "center";
+ valign = "center";
+ };
+
+ # INPUT FIELD
+ input-field = {
+ size = "300, 60";
+ outline_thickness = 4;
+ dots_size = 0.2;
+ dots_spacing = 0.2;
+ dots_center = true;
+ outer_color = lib.mkDefault "$accent";
+ inner_color = lib.mkDefault "$surface0";
+ font_color = lib.mkDefault "$text";
+ fade_on_empty = false;
+ placeholder_text = " Logged in as $USER";
+ hide_input = false;
+ check_color = lib.mkDefault "$accent";
+ fail_color = lib.mkDefault "$red";
+ fail_text = "$FAIL ($ATTEMPTS)";
+ capslock_color = lib.mkDefault "$yellow";
+ position = "0, -47";
+ halign = "center";
+ valign = "center";
+ };
+ };
+ };
+}
diff --git a/home/hyprland/hyprlock/face.png b/home/hyprland/hyprlock/face.png
new file mode 100644
index 0000000..81edd1f
Binary files /dev/null and b/home/hyprland/hyprlock/face.png differ
diff --git a/home/hyprland/waybar/config/config.jsonc b/home/hyprland/waybar/config/config.jsonc
index 5b9ea95..b0e2bbb 100644
--- a/home/hyprland/waybar/config/config.jsonc
+++ b/home/hyprland/waybar/config/config.jsonc
@@ -96,7 +96,7 @@
},
"custom/lock": {
"tooltip": false,
- "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
+ "on-click": "sh -c '(sleep 0.5s; hyprlock)'",
"format": ""
},
"custom/power": {
diff --git a/home/wlogout/default.nix b/home/wlogout/default.nix
index 4ef4516..3a799e6 100644
--- a/home/wlogout/default.nix
+++ b/home/wlogout/default.nix
@@ -16,7 +16,7 @@
layout = [
{
label = "lock";
- action = "sh -c '(sleep 0.5s; swaylock)' & disown";
+ action = "sh -c '(sleep 0.5s; hyprlock)'";
text = "Lock";
keybind = "l";
}
diff --git a/hyprland/default.nix b/hyprland/default.nix
index 798d011..aca4d57 100644
--- a/hyprland/default.nix
+++ b/hyprland/default.nix
@@ -13,10 +13,13 @@
hyprpolkitagent # Auth deamon providing modals for password auth
];
- programs.hyprland = {
- enable = true;
- xwayland.enable = true;
+ programs = {
+ hyprland = {
+ enable = true;
+ xwayland.enable = true;
+ };
+ hyprlock.enable = true; # Lock screen
};
- services.hypridle.enable = true;
+ services.hypridle.enable = true; # Lock when unused
}