From 2f0bdce9a6baf17ea5dd481699a7450cd9e7c9c3 Mon Sep 17 00:00:00 2001 From: Martin Benonisen Date: Thu, 16 Jan 2025 13:59:51 +0100 Subject: [PATCH] lol --- system/services/hyprland.nix | 17 +++++++ user/hyprland/cursor.nix | 13 ++++++ user/hyprland/default.nix | 8 ++++ user/hyprland/hypridle.conf | 12 +++++ user/hyprland/hypridle.nix | 16 +++++++ user/hyprland/hyprland.nix | 0 user/hyprland/hyprlock.conf | 91 ++++++++++++++++++++++++++++++++++++ user/hyprland/hyprlock.nix | 16 +++++++ user/hyprland/hyprpaper.conf | 1 + user/hyprland/xdg.nix | 9 ++++ 10 files changed, 183 insertions(+) create mode 100644 system/services/hyprland.nix create mode 100644 user/hyprland/cursor.nix create mode 100644 user/hyprland/default.nix create mode 100644 user/hyprland/hypridle.conf create mode 100644 user/hyprland/hypridle.nix create mode 100644 user/hyprland/hyprland.nix create mode 100644 user/hyprland/hyprlock.conf create mode 100644 user/hyprland/hyprlock.nix create mode 100644 user/hyprland/hyprpaper.conf create mode 100644 user/hyprland/xdg.nix diff --git a/system/services/hyprland.nix b/system/services/hyprland.nix new file mode 100644 index 0000000..e8cae4f --- /dev/null +++ b/system/services/hyprland.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: +{ + programs.hyprland = { + enable = true; + extraPackages = with pkgs; [ + kitty + ]; + portalPackage = pkgs.xdg-desktop-portal-hyprland; + }; + services = { + displayManager = { + autoLogin.enable = true; + autoLogin.user = "mbeno"; + }; + logind.extraConfig = "IdleAction=ignore"; + }; +} diff --git a/user/hyprland/cursor.nix b/user/hyprland/cursor.nix new file mode 100644 index 0000000..ef279c2 --- /dev/null +++ b/user/hyprland/cursor.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + home.pointerCursor = { + gtk.enable = true; + # x11.enable = true; + package = pkgs.catppuccin-cursors.macchiatoLavender; + # name = "Catppuccin-Macchiato-Lavender-Cursors"; + name = "catppuccin-macchiato-lavender-cursors"; + size = 32; + }; + + gtk.enable = true; +} diff --git a/user/hyprland/default.nix b/user/hyprland/default.nix new file mode 100644 index 0000000..6fad0dc --- /dev/null +++ b/user/hyprland/default.nix @@ -0,0 +1,8 @@ +{ + imports = [ + ./hyprland.nix + ./waybar + ./xdg.nix + ./cursor.nix + ]; +} diff --git a/user/hyprland/hypridle.conf b/user/hyprland/hypridle.conf new file mode 100644 index 0000000..346b64e --- /dev/null +++ b/user/hyprland/hypridle.conf @@ -0,0 +1,12 @@ +general { + lock_cmd = hyprlock # dbus/sysd lock command (loginctl lock-session) + # unlock_cmd = notify-send "unlock!" # same as above, but unlock + before_sleep_cmd = lockhelper # command ran before sleep + # after_sleep_cmd = # command ran after sleep + ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests (used by e.g. firefox or steam) +} + +listener { + timeout = 240 # in seconds + on-timeout = lockhelper # command to run when timeout has passed +} diff --git a/user/hyprland/hypridle.nix b/user/hyprland/hypridle.nix new file mode 100644 index 0000000..e745c52 --- /dev/null +++ b/user/hyprland/hypridle.nix @@ -0,0 +1,16 @@ +{ + config, + osConfig, + pkgs, + ... +}: +{ + + home.packages = with pkgs; [ hypridle ]; + xdg.configFile = { + "hypr/hypridle.conf" = { + source = config.lib.file.mkOutOfStoreSymlink ./. + "/hypridle_${osConfig.system.name}.conf"; + target = "hypr/hypridle.conf"; + }; + }; +} diff --git a/user/hyprland/hyprland.nix b/user/hyprland/hyprland.nix new file mode 100644 index 0000000..e69de29 diff --git a/user/hyprland/hyprlock.conf b/user/hyprland/hyprlock.conf new file mode 100644 index 0000000..168bdc4 --- /dev/null +++ b/user/hyprland/hyprlock.conf @@ -0,0 +1,91 @@ +# BACKGROUND +background { + monitor = DP-5 + path = /tmp/lockscreen/DP-5.png + blur_passes = 3 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +background { + monitor = DP-6 + path = /tmp/lockscreen/DP-6.png + blur_passes = 3 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} +background { + monitor = DP-7 + path = /tmp/lockscreen/DP-7.png + blur_passes = 3 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} +background { + monitor = DP-8 + path = /tmp/lockscreen/DP-8.png + blur_passes = 3 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 +} + +# GENERAL +general { + no_fade_in = false + grace = 0 + disable_loading_bar = true +} + +# INPUT FIELD +input-field { + monitor = + size = 250, 60 + outline_thickness = 2 + dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = true + outer_color = rgba(0, 0, 0, 0) + inner_color = rgba(0, 0, 0, 0.5) + font_color = rgb(200, 200, 200) + fade_on_empty = false + font_family = JetBrains Mono Nerd Font Mono + placeholder_text = Input Password... + hide_input = false + position = 0, -120 + halign = center + valign = center +} + +# TIME +label { + monitor = + text = cmd[update:2000] echo "$(date +"%b %d %H:%M")" + #color = $foreground + color = rgba(255, 255, 255, 0.6) + font_size = 120 + font_family = JetBrains Mono Nerd Font Mono ExtraBold + position = 0, -300 + halign = center + valign = top +} + +## USER +#label { +# monitor = +# text = Hi there, $USER +# color = $foreground +# #color = rgba(255, 255, 255, 0.6) +# font_size = 25 +# font_family = JetBrains Mono Nerd Font Mono +# position = 0, -40 +# halign = center +# valign = center +#} diff --git a/user/hyprland/hyprlock.nix b/user/hyprland/hyprlock.nix new file mode 100644 index 0000000..b841b16 --- /dev/null +++ b/user/hyprland/hyprlock.nix @@ -0,0 +1,16 @@ +{ + config, + osConfig, + pkgs, + ... +}: +{ + + home.packages = with pkgs; [ hyprlock ]; + xdg.configFile = { + "hypr/hyprlock.conf" = { + source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprlock_${osConfig.system.name}.conf"; + target = "hypr/hyprlock.conf"; + }; + }; +} diff --git a/user/hyprland/hyprpaper.conf b/user/hyprland/hyprpaper.conf new file mode 100644 index 0000000..4cf552c --- /dev/null +++ b/user/hyprland/hyprpaper.conf @@ -0,0 +1 @@ +splash = false diff --git a/user/hyprland/xdg.nix b/user/hyprland/xdg.nix new file mode 100644 index 0000000..2b71d6a --- /dev/null +++ b/user/hyprland/xdg.nix @@ -0,0 +1,9 @@ +{ config, ... }: +{ + xdg.configFile = { + "hypr/hyprpaper.conf" = { + source = config.lib.file.mkOutOfStoreSymlink ./. + "/hyprpaper.conf"; + target = "hypr/hyprpaper.conf"; + }; + }; +}