wayland: rewrite hypr* configs again

using upstream hm modules
This commit is contained in:
notohh 2024-05-26 16:48:37 -04:00
parent 2c21185928
commit 1d4a7cfd63
Signed by: notohh
GPG key ID: BD47506D475EE86D
4 changed files with 125 additions and 141 deletions

View file

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
inputs,
...
}: {
imports = [./services/greetd.nix]; imports = [./services/greetd.nix];
environment = { environment = {
systemPackages = with pkgs; [ systemPackages = with pkgs; [
@ -38,7 +34,6 @@
enable = true; enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs; [
xdg-desktop-portal-gtk xdg-desktop-portal-gtk
inputs.xdg-portal-hyprland.packages.${pkgs.system}.default
]; ];
config = { config = {
common.default = "*"; common.default = "*";

View file

@ -1,10 +1,8 @@
{inputs, ...}: { _: {
imports = [inputs.hyprlock.homeManagerModules.default];
disabledModules = ["${inputs.home-manager}/modules/programs/hyprlock.nix"];
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
backgrounds = let settings = {
background = let
verticalWallpaper = "/home/notoh/Pictures/wallpapers/sparkle.png"; verticalWallpaper = "/home/notoh/Pictures/wallpapers/sparkle.png";
horizontalWallpaper = "/home/notoh/Pictures/wallpapers/sparkle2.png"; horizontalWallpaper = "/home/notoh/Pictures/wallpapers/sparkle2.png";
in [ in [
@ -43,13 +41,10 @@
hide_cursor = false; hide_cursor = false;
no_fade_in = false; no_fade_in = false;
}; };
input-fields = [ input-field = [
{ {
monitor = "DP-2"; monitor = "DP-2";
size = { size = "350, 50";
width = 350;
height = 50;
};
outline_thickness = 2; outline_thickness = 2;
outer_color = "rgb(f7768e)"; outer_color = "rgb(f7768e)";
inner_color = "rgb(1a1b26)"; inner_color = "rgb(1a1b26)";
@ -70,7 +65,7 @@
shadow_boost = 1.0; shadow_boost = 1.0;
} }
]; ];
labels = [ label = [
{ {
monitor = "DP-2"; monitor = "DP-2";
text = '' text = ''
@ -88,10 +83,7 @@
monitor = "DP-2"; monitor = "DP-2";
text = "$TIME"; text = "$TIME";
color = "rgb(c0caf5)"; color = "rgb(c0caf5)";
position = { position = "0, 120";
x = 0;
y = 120;
};
valign = "center"; valign = "center";
halign = "center"; halign = "center";
shadow_passes = 3; shadow_passes = 3;
@ -101,4 +93,5 @@
} }
]; ];
}; };
};
} }

View file

@ -1,27 +1,27 @@
{ {
inputs,
pkgs, pkgs,
lib, lib,
config, config,
... ...
}: { }: {
imports = [inputs.hypridle.homeManagerModules.default];
disabledModules = ["${inputs.home-manager}/modules/services/hypridle.nix"];
services.hypridle = { services.hypridle = {
enable = true; enable = true;
ignoreDbusInhibit = false; settings = {
lockCmd = lib.getExe config.programs.hyprlock.package; general = {
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session"; ignore_dbus_inhibit = false;
listeners = [ lock_cmd = lib.getExe config.programs.hyprlock.package;
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
};
listener = [
{ {
timeout = 400; timeout = 400;
onTimeout = "${lib.getExe config.programs.hyprlock.package}"; on-timeout = "${lib.getExe config.programs.hyprlock.package}";
} }
{ {
timeout = 460; timeout = 460;
onTimeout = "${pkgs.systemd}/bin/systemctl suspend"; on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
} }
]; ];
}; };
};
} }

View file

@ -1,25 +1,21 @@
{ {pkgs, ...}: {
inputs,
pkgs,
...
}: {
home.packages = [pkgs.hyprpaper]; home.packages = [pkgs.hyprpaper];
imports = [inputs.hyprpaper.homeManagerModules.default];
disabledModules = ["${inputs.home-manager}/modules/services/hyprpaper.nix"];
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;
settings = {
ipc = true; ipc = true;
splash = false; splash = false;
preloads = [ preload = [
"~/Pictures/wallpapers/sparkle3.png" "~/Pictures/wallpapers/sparkle3.png"
"~/Pictures/wallpapers/sparkle4.png" "~/Pictures/wallpapers/sparkle4.png"
]; ];
wallpapers = [ wallpaper = [
"HDMI-A-1,~/Pictures/wallpapers/sparkle3.png" "HDMI-A-1,~/Pictures/wallpapers/sparkle3.png"
"DP-1,~/Pictures/wallpapers/sparkle4.png" "DP-1,~/Pictures/wallpapers/sparkle4.png"
"DP-2,~/Pictures/wallpapers/sparkle4.png" "DP-2,~/Pictures/wallpapers/sparkle4.png"
"DP-3,~/Pictures/wallpapers/sparkle3.png" "DP-3,~/Pictures/wallpapers/sparkle3.png"
]; ];
}; };
};
} }