Update Hyprland, use hyprpaper for wallpaper, split video
Change-Id: I4a000c722e074793d33822e8985539f212cf3299
Reviewed-on: https://git.clicks.codes/c/Coded/nixConfig/+/371
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/codedPC/eww.nix b/modules/codedPC/eww.nix
index edbdf3e..b8b658d 100644
--- a/modules/codedPC/eww.nix
+++ b/modules/codedPC/eww.nix
@@ -1,6 +1,7 @@
-{ flakeRoot, ... }: {
+{ flakeRoot, pkgs, ... }: {
home-manager.users.coded.programs.eww = {
enable = true;
+ package = pkgs.eww-wayland;
configDir = "${flakeRoot}/extensions/eww";
};
}
diff --git a/modules/codedPC/hyprland.nix b/modules/codedPC/hyprland.nix
new file mode 100644
index 0000000..a24e691
--- /dev/null
+++ b/modules/codedPC/hyprland.nix
@@ -0,0 +1,104 @@
+{ pkgs, inputs, flakeRoot, system, ... }: {
+
+ programs.hyprland.enable = true;
+
+ home-manager.users.coded = {
+ home.packages = [ pkgs.hyprpicker ];
+
+ wayland.windowManager.hyprland = {
+ enable = true;
+
+ xwayland.enable = true;
+ systemd.enable = true;
+
+ plugins = [
+
+ ];
+
+ settings = let
+ mod = "SUPER";
+ terminal = "kitty";
+ menu = "anyrun";
+ reloadWallpaper = "${inputs.nixpkgs-unstable.legacyPackages.${system}.hyprpaper}/bin/hyprpaper";
+ in {
+ exec-once = "${reloadWallpaper}";
+
+ general = {
+ gaps_in = 5;
+ gaps_out = 20;
+
+ border_size = 2;
+ "col.active_border" = "rgba(71AEF5EE) rgba(F2D478EE) 45deg";
+ "col.inactive_border" = "rgba(C4C4C4EE)";
+
+ layout = "dwindle";
+ };
+
+ decoration = {
+ rounding = 10;
+
+ drop_shadow = true;
+ shadow_range = 4;
+ shadow_render_power = 3;
+ "col.shadow" = "rgba(1a1a1aee)";
+ };
+
+ input = {
+ kb_layout = "us";
+ numlock_by_default = true;
+ };
+
+ monitor = [
+ "DP-1,1920x1080@165,0x0,1"
+ "DP-2,1920x1080@165,1920x0,1"
+ "HDMI-A-1,1920x1080@60,960x-1080,1"
+ ",preferred,auto,1"
+ ];
+
+ xwayland = {
+ force_zero_scaling = true;
+ };
+
+ master = {
+ new_is_master = true;
+ };
+
+ bind = [
+ "${mod}, Q, killactive"
+ "${mod}, SPACE, togglefloating"
+ "${mod}, RETURN, exec, ${terminal}"
+ "${mod}, down, movefocus, d"
+ "${mod}, up, movefocus, u"
+ "${mod}, right, movefocus, r"
+ "${mod}, left, movefocus, l"
+
+ "${mod} SHIFT, R, exec, ${reloadWallpaper}"
+
+ "ALT, SPACE, exec, ${menu}"
+ ] ++ (
+ builtins.concatLists (builtins.genList (
+ x: let
+ ws = let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in [
+ "${mod}, ${ws}, workspace, ${toString (x + 1)}"
+ "${mod} SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+ ]
+ )
+ 10)
+ );
+
+ bindm = [
+ "${mod}, mouse:272, movewindow"
+ "${mod}, mouse:273, resizewindow"
+ ];
+
+ misc = {
+ force_default_wallpaper = 0;
+ };
+ };
+ };
+ };
+}
diff --git a/modules/codedPC/hyprpaper.nix b/modules/codedPC/hyprpaper.nix
new file mode 100644
index 0000000..8a09def
--- /dev/null
+++ b/modules/codedPC/hyprpaper.nix
@@ -0,0 +1,18 @@
+{ inputs, flakeRoot, system, ... }: let
+ wallpaper = "${flakeRoot}/extensions/hyprpaper/wallpaper.png";
+in {
+ home-manager.users.coded.home = {
+ packages = [
+ inputs.nixpkgs-unstable.legacyPackages.${system}.hyprpaper
+ ];
+
+ file.".config/hypr/hyprpaper.conf".text = ''
+ preload = ${wallpaper}
+
+ wallpaper=,${wallpaper}
+
+ splash = true
+ splash_offset = -0.5
+ '';
+ };
+}
diff --git a/modules/codedPC/opengl.nix b/modules/codedPC/opengl.nix
new file mode 100644
index 0000000..55a5ea4
--- /dev/null
+++ b/modules/codedPC/opengl.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+ hardware.opengl = {
+ enable = true;
+ driSupport = true;
+ driSupport32Bit = true;
+ extraPackages = [
+ pkgs.vaapiVdpau
+ ];
+ };
+}
diff --git a/modules/codedPC/video.nix b/modules/codedPC/video.nix
deleted file mode 100644
index bc5cffb..0000000
--- a/modules/codedPC/video.nix
+++ /dev/null
@@ -1,122 +0,0 @@
-{ pkgs, inputs, ... }: {
-
- programs.hyprland.enable = true;
-
- home-manager.users.coded = {
- home.packages = [ pkgs.hyprpicker ];
-
- wayland.windowManager.hyprland = {
- enable = true;
-
- xwayland.enable = true;
- systemd.enable = true;
-
- plugins = [
-
- ];
-
-
- settings = {
- "$mainMod" = "SUPER";
- "$terminal" = "kitty";
- "$menu" = "anyrun";
-
- general = {
- gaps_in = 5;
- gaps_out = 20;
-
- border_size = 2;
- "col.active_border" = "rgba(71AEF5EE) rgba(F2D478EE) 45deg";
- "col.inactive_border" = "rgba(C4C4C4EE)";
-
- layout = "dwindle";
- };
-
- decoration = {
- rounding = 10;
-
- drop_shadow = true;
- shadow_range = 4;
- shadow_render_power = 3;
- "col.shadow" = "rgba(1a1a1aee)";
- };
-
- input = {
- kb_layout = "us";
- numlock_by_default = true;
- };
-
- monitor = [
- "DP-1,1920x1080@165,0x0,1"
- "DP-2,1920x1080@165,1920x0,1"
- "HDMI-A-1,1920x1080@60,960x-1080,1"
- ",preferred,auto,1"
- ];
-
- xwayland = {
- force_zero_scaling = true;
- };
-
- master = {
- new_is_master = true;
- };
-
- bind = [
- "$mainMod, Q, killactive"
- "$mainMod, SPACE, togglefloating"
- "$mainMod, RETURN, exec, $terminal"
- "$mainMod, down, movefocus, d"
- "$mainMod, up, movefocus, u"
- "$mainMod, right, movefocus, r"
- "$mainMod, left, movefocus, l"
-
- "ALT, SPACE, exec, $menu"
- ] ++ (
- builtins.concatLists (builtins.genList (
- x: let
- ws = let
- c = (x + 1) / 10;
- in
- builtins.toString (x + 1 - (c * 10));
- in [
- "$mainMod, ${ws}, workspace, ${toString (x + 1)}"
- "$mainMod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
- ]
- )
- 10)
- );
-
- bindm = [
- "$mainMod, mouse:272, movewindow"
- "$mainMod, mouse:273, resizewindow"
- ];
- };
- };
- };
-
- # services.xserver.enable = true;
- # services.xserver.videoDrivers = [ "amdgpu" ];
-
- # services.xserver.displayManager.sddm.enable = true;
- # services.xserver.desktopManager.plasma5.enable = true;
-
- # hardware.opengl.driSupport = true;
- # # For 32 bit applications
- # hardware.opengl.driSupport32Bit = true;
-
- # programs.dconf.enable = true;
-
- # services.xserver = {
- # layout = "us";
- # xkbVariant = "";
- # };
-
- hardware.opengl = {
- enable = true;
- driSupport = true;
- driSupport32Bit = true;
- extraPackages = [
- pkgs.vaapiVdpau
- ];
- };
-}