Wayland touchpad options + Pinea config

Change-Id: I74994cf455b7dbd79a08ba41fa6a0922bbfaf670

Author: PineaFan <pineafan@clicks.codes>
Change-Id: I8c893e504671c6894d095b12f522c59d34656307
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/845
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: PineaFan <pineafan@clicks.codes>
diff --git a/homes/x86_64-linux/pinea@saurosuchus/default.nix b/homes/x86_64-linux/pinea@saurosuchus/default.nix
index dfb6245..d6f84f8 100644
--- a/homes/x86_64-linux/pinea@saurosuchus/default.nix
+++ b/homes/x86_64-linux/pinea@saurosuchus/default.nix
@@ -36,14 +36,15 @@
   };
 
   home.packages = [
-    pkgs.kate
-    pkgs.libsForQt5.kfind
     pkgs.vlc
     pkgs.obs-studio
     pkgs.python312
     pkgs.playerctl
     pkgs.nodePackages.pnpm
+    pkgs.yarn
     pkgs.blender-hip
+    pkgs.nodejs_22
+    pkgs.pgadmin4-desktopmode
   ];
 
   programs.firefox.profiles.chimera.settings = {
@@ -79,7 +80,14 @@
       alternativeSearch.enable = true;
     };
 
-    # input.mouse.scrolling.speedFactor = 0.45;
+    input.touchpad = {
+      enable = true;
+      scrolling.natural = true;
+      scrolling.factor = 0.2;
+      tapToClick = true;
+    };
+    input.mouse.sensitivity = 0.5;
+
     hyprland = {
       hyprpaper.splash.enable = false;
       enable = true;
@@ -92,6 +100,7 @@
         blur = 12;
         rounding = 16;
       };
+      keybinds.appleMagic = true;
       keybinds.extraBinds = [
         {
           meta = "CTRL";
@@ -112,6 +121,11 @@
           function = "exec, ~/Pictures/Wallpapers/change.sh dark";
         }
         {
+          meta = "CTRL";
+          key = "XF86Eject";
+          function = "exec, systemctl suspend";
+        }
+        {
           key = "KP_End";
           function = "exec, openrgb --device 0 -z 0 --color FF0000 -m \"static\"";
         }
@@ -187,6 +201,7 @@
 
     input.keyboard = {
       layout = "gb";
+      variant = "mac";
     };
 
     git = {
@@ -207,7 +222,7 @@
     yubikey.pam.key = "pinea:ZY1C32oFgQxsKlJEccxdI6rcdC8cZU8gWnBHMRgwb+MVvbRRqdYVHkIlXokscurAi5s/iQ5jnngDXUwG103ajQ==,m9X/BEHiXM1CrXu1u2zvItbd/Qa/tQGAxhIuD2NB2ohwo5d+vODwYl2faUnLhxcJexOWYBHOAzyWwwoeVRQFJw==,es256,+presence";
 
     waybar.modules.temperature.enable = true;
-    waybar.modules.temperature.hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input";
+    waybar.modules.temperature.hwmonPath = "/sys/class/hwmon/hwmon3/temp1_input";
   };
 
   services.kdeconnect.enable = true;
diff --git a/modules/home/wayland/default.nix b/modules/home/wayland/default.nix
index be4965a..e6b05df 100644
--- a/modules/home/wayland/default.nix
+++ b/modules/home/wayland/default.nix
@@ -16,6 +16,21 @@
       description = "Enable natural scrolling";
       default = config.chimera.input.mouse.scrolling.natural;
     };
+    input.touchpad.scrolling.factor = lib.mkOption {
+      type = lib.types.float;
+      description = "Scrolling factor";
+      default = 1;
+    };
+    input.touchpad.tapToClick = lib.mkOption {
+      type = lib.types.bool;
+      description = "Enable tap to click";
+      default = true;
+    };
+    input.mouse.sensitivity = lib.mkOption {
+      type = lib.types.float;
+      description = "Mouse sensitivity";
+      default = 1;
+    };
     input.keyboard = {
       layout = lib.mkOption {
         type = lib.types.str;
diff --git a/modules/home/wayland/hyprland/default.nix b/modules/home/wayland/hyprland/default.nix
index f8a96cc..5dee95f 100644
--- a/modules/home/wayland/hyprland/default.nix
+++ b/modules/home/wayland/hyprland/default.nix
@@ -149,11 +149,20 @@
 
             numlock_by_default = true;
 
+            sensitivity = config.chimera.input.mouse.sensitivity;
+
             touchpad = {
               natural_scroll = config.chimera.input.touchpad.scrolling.natural;
+              scroll_factor = config.chimera.input.touchpad.scrolling.factor;
+              clickfinger_behavior = true;
+              tap-to-click = config.chimera.input.touchpad.tapToClick;
             };
           };
 
+          gestures = lib.mkIf config.chimera.input.touchpad.enable {
+            workspace_swipe = true;
+          };
+
           xwayland = {
             force_zero_scaling = true;
           };
diff --git a/systems/x86_64-linux/saurosuchus/audio/default.nix b/systems/x86_64-linux/saurosuchus/audio/default.nix
new file mode 100644
index 0000000..eab8f48
--- /dev/null
+++ b/systems/x86_64-linux/saurosuchus/audio/default.nix
@@ -0,0 +1,51 @@
+{...}: {
+  services.pipewire.extraConfig.pipewire."monitors" = {
+    "context.modules" = [
+      {
+        name = "libpipewire-module-combine-stream";
+        args = {
+          "combine.mode" = "sink";
+          "node.name" = "monitors";
+          "node.description" = "Monitors Auto";
+          "combine.latency-compensate" = false;
+          "combine.props" = {
+            "audio.position" = [ "FL" "FR" ];
+          };
+          "stream.props" = {
+            "stream.dont-remix" = true;
+          };
+          "stream.rules" = [
+            {
+              matches = [
+                {
+                  "media.class" = "Audio/Sink";
+                  "node.name" = "alsa_output.pci-0000_0a_00.1.pro-output-7";
+                }
+              ];
+              actions = {
+                create-stream = {
+                  "audio.position" = [ "AUX0" "AUX1" ];
+                  "combine.audio.position" = [ "FL" ];
+                };
+              };
+            }
+            {
+              matches = [
+                {
+                  "media.class" = "Audio/Sink";
+                  "node.name" = "alsa_output.pci-0000_0a_00.1.pro-output-9";
+                }
+              ];
+              actions = {
+                create-stream = {
+                  "audio.position" = [ "AUX0" "AUX1" ];
+                  "combine.audio.position" = [ "FR" ];
+                };
+              };
+            }
+          ];
+        };
+      }
+    ];
+  };
+}
diff --git a/systems/x86_64-linux/saurosuchus/default.nix b/systems/x86_64-linux/saurosuchus/default.nix
index 6341e28..a4ce57c 100644
--- a/systems/x86_64-linux/saurosuchus/default.nix
+++ b/systems/x86_64-linux/saurosuchus/default.nix
@@ -1,6 +1,7 @@
-{ ... }:
+{ pkgs, ... }:
 {
   imports = [
+    ./audio
     ./console
     ./compositor
     ./games
@@ -13,4 +14,17 @@
     ./time
     ./yubikey
   ];
+
+  config.services.postgresql = {
+    enable = true;
+    ensureDatabases = [ "graphite" "development" ];
+    enableTCPIP = true;
+    authentication = pkgs.lib.mkOverride 10 ''
+      #type database DBuser auth-method
+      local all all trust
+
+      host all all 127.0.0.1/32 trust
+      host all all ::1/128 trust
+    '';
+  };
 }