diff --git a/assets/lockscreen.png b/assets/lockscreen.png new file mode 100644 index 0000000..c868176 Binary files /dev/null and b/assets/lockscreen.png differ diff --git a/modules/home/home.nix b/modules/home/home.nix index a2abb6d..a656a88 100755 --- a/modules/home/home.nix +++ b/modules/home/home.nix @@ -50,6 +50,7 @@ claude-code xsel nss.tools + ansible # System tools btop diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index 9d1551e..828e4b0 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -61,6 +61,7 @@ "$mod SHIFT, c, togglespecialworkspace, comms" "$mod SHIFT, a, togglespecialworkspace, research" "$mod SHIFT ALT, x, exec, hyprctl dispatch exit" + "$mod SHIFT ALT, l, exec, hyprlock" # "SHIFT, Print, exec, grimblast copy area" # "CTRL, Print, exec, grimblast copy active" ] diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index ab39282..48a9b11 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -10,6 +10,7 @@ ./binds.nix ./hyprpaper.nix ./hyprpanel.nix + ./hyprlock.nix ./wofi.nix ./desktop-env.nix ./screenshots.nix @@ -25,6 +26,7 @@ libnotify # Desktop env hyprpanel + hyprpolkitagent # Utility wl-clipboard ]; @@ -97,6 +99,8 @@ exec-once = [ # "quickshell -c hyprshell" "hyprpanel" + "hypridle" + "systemctl --user start hyprpolkitagent" ]; }; diff --git a/modules/home/hyprland/hyprlock.nix b/modules/home/hyprland/hyprlock.nix new file mode 100644 index 0000000..3e28205 --- /dev/null +++ b/modules/home/hyprland/hyprlock.nix @@ -0,0 +1,87 @@ +{ + inputs, + assets, + lib, + ... +}: +{ + programs.hyprlock = { + enable = true; + + settings = { + # Variables + "$font" = "Monospace"; + + general = { + hide_cursor = false; + }; + + animations = { + enabled = true; + bezier = "linear, 1, 1, 0, 0"; + animation = [ + "fadeIn, 1, 5, linear" + "fadeOut, 1, 5, linear" + "inputFieldDots, 1, 2, linear" + ]; + }; + + background = lib.mkForce [ + { + monitor = ""; + path = "/etc/lockscreen.png"; + blur_passes = 1; + } + ]; + + # input-field = [ + # { + # monitor = ""; + # size = "20%, 5%"; + # fade_on_empty = false; + # rounding = 15; + # font_family = "$font"; + # placeholder_text = "Input password..."; + # fail_text = "$PAMFAIL"; + # # Uncomment to use a letter instead of a dot to indicate the typed password + # # dots_text_format = "*"; + # # dots_size = 0.4; + # dots_spacing = 0.3; + # # Uncomment to use an input indicator that does not show the password length + # # hide_input = true; + # position = "0, -20"; + # halign = "center"; + # valign = "center"; + # } + # ]; + + # Labels are defined as a list since there are multiple + label = [ + # TIME + { + monitor = ""; + text = "$TIME"; # ref. https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/#variable-substitution + font_size = 90; + font_family = "$font"; + position = "-30, 0"; + halign = "right"; + valign = "top"; + } + # DATE + { + monitor = ""; + text = ''cmd[update:60000] date +"%A, %d %B %Y"''; # update every 60 seconds + font_size = 25; + font_family = "$font"; + position = "-30, -150"; + halign = "right"; + valign = "top"; + } + ]; + }; + }; + + stylix.targets.hyprlock = { + useWallpaper = true; + }; +} diff --git a/modules/system/display-manager/sddm.nix b/modules/system/display-manager/sddm.nix index afc7afb..54998ca 100644 --- a/modules/system/display-manager/sddm.nix +++ b/modules/system/display-manager/sddm.nix @@ -13,6 +13,7 @@ in environment = { etc = { "sddm-wallpaper.png".source = "${assets}/sddm-background.png"; + "lockscreen.png".source = "${assets}/lockscreen.png"; "gtk-3.0/settings.ini".text = '' [Settings] gtk-icon-theme-name=Papirus diff --git a/modules/system/gaming.nix b/modules/system/gaming.nix index 7b60891..abef630 100644 --- a/modules/system/gaming.nix +++ b/modules/system/gaming.nix @@ -12,4 +12,11 @@ environment.systemPackages = with pkgs; [ gamemode ]; + + # In your configuration.nix + hardware.opengl = { + enable = true; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; }