From 6e878f2ee3e7efe7aa1c47847dfd7eaeb50085ca Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 25 Nov 2025 07:34:03 +0100 Subject: [PATCH] WIP --- nixos/hosts/Tibo-NixDesk/default.nix | 12 +++- nixos/modules/desktop/hyprland/default.nix | 33 ++++++++-- .../networking/networkmanager/default.nix | 8 ++- stow/hyprland/.config/hypr/hy3.conf | 3 +- stow/hyprland/.config/hypr/hyprland.conf | 5 +- stow/hyprland/.config/hypr/modes.conf | 62 +++++++++++++++++++ stow/waybar/.config/waybar/config.jsonc | 10 +-- 7 files changed, 116 insertions(+), 17 deletions(-) diff --git a/nixos/hosts/Tibo-NixDesk/default.nix b/nixos/hosts/Tibo-NixDesk/default.nix index fe71d29..3a22a2c 100644 --- a/nixos/hosts/Tibo-NixDesk/default.nix +++ b/nixos/hosts/Tibo-NixDesk/default.nix @@ -78,9 +78,15 @@ networking.hostName = "Tibo-NixDesk"; - services.xserver.xkb = { - layout = "us"; - variant = "altgr-intl"; + services = { + xserver.xkb = { + layout = "us"; + variant = "altgr-intl"; + }; + + openvpn.servers = { + tryHackMeVPN = { config = '' config /root/nixos/openvpn/tryHackMeVPN-tdpeuter.conf ''; }; + }; }; system.stateVersion = "24.05"; diff --git a/nixos/modules/desktop/hyprland/default.nix b/nixos/modules/desktop/hyprland/default.nix index 6d7d25b..3572342 100644 --- a/nixos/modules/desktop/hyprland/default.nix +++ b/nixos/modules/desktop/hyprland/default.nix @@ -1,7 +1,31 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, pkgs-unstable, system, ... }: let cfg = config.sisyphus.desktop.hyprland; + + inherit (pkgs-unstable.hyprlandPlugins.hy3) version; + + # Make hyprland package follow latest release of Hy3 + hyprland = pkgs-unstable.hyprland.overrideAttrs (old: { + version = "0.52.0"; + src = pkgs-unstable.fetchFromGitHub { + owner = "hyprwm"; + repo = "Hyprland"; + fetchSubmodules = true; + rev = "f56ec180d3a03a5aa978391249ff8f40f949fb73"; + hash = "sha256-aZCTbfKkxsEinY5V7R0NYuuitKLYc8ig8T91+yDMGJ0="; + }; + }); + + hy3 = pkgs-unstable.hyprlandPlugins.hy3.overrideAttrs (old: { + version = "hl0.52.0"; + src = pkgs-unstable.fetchFromGitHub { + owner = "outfoxxed"; + repo = "hy3"; + rev = "16dae4d8f853b0d3e8434ee9941f9fc0155b8952"; + hash = "sha256-UeMEUlQsil5DEtF/VQ//41vXJF9ff2xjoYVjhR6dqu4="; + }; + }); in { options.sisyphus.desktop.hyprland.enable = lib.mkEnableOption "Hyprland"; @@ -15,7 +39,7 @@ in { SCRIPT_DIR = ../../../../scripts; }; - systemPackages = with pkgs; [ + systemPackages = (with pkgs; [ brightnessctl dunst libnotify @@ -27,8 +51,6 @@ in { wl-mirror # Mirror an output wdisplays # Tool to configure displays - hyprlandPlugins.hy3 # i3/sway layout plugin - swaylock glib @@ -39,11 +61,14 @@ in { jq j4-dmenu-desktop rofi + ]) ++ [ + hy3 # i3/sway layout plugin ]; }; programs.hyprland = { enable = true; + package = hyprland; xwayland.enable = true; }; diff --git a/nixos/modules/networking/networkmanager/default.nix b/nixos/modules/networking/networkmanager/default.nix index 492e724..b47874e 100644 --- a/nixos/modules/networking/networkmanager/default.nix +++ b/nixos/modules/networking/networkmanager/default.nix @@ -6,7 +6,13 @@ in { options.sisyphus.networking.networkmanager.enable = lib.mkEnableOption "NetworkManager"; config = lib.mkIf cfg.enable { - networking.networkmanager.enable = true; + networking.networkmanager = { + enable = true; + + plugins = with pkgs; [ + networkmanager-openvpn + ]; + }; # Prevent slow boot times systemd.services.NetworkManager-wait-online.enable = false; diff --git a/stow/hyprland/.config/hypr/hy3.conf b/stow/hyprland/.config/hypr/hy3.conf index 7d3e999..ef08fda 100644 --- a/stow/hyprland/.config/hypr/hy3.conf +++ b/stow/hyprland/.config/hypr/hy3.conf @@ -1,6 +1,7 @@ # TODO Do not hardcode this path -plugin = /nix/store/afivj8v5kfdsadxs4pa45vh0y65s3ajm-hy3-hl0.49.0/lib/libhy3.so +#plugin = /nix/store/afivj8v5kfdsadxs4pa45vh0y65s3ajm-hy3-hl0.49.0/lib/libhy3.so +plugin = /nix/store/fvy4gwas10pvww67gxc3da08kn2w3pm7-hy3-0.51.0/lib/libhy3.so general:layout = hy3 diff --git a/stow/hyprland/.config/hypr/hyprland.conf b/stow/hyprland/.config/hypr/hyprland.conf index 6dc3b6b..9907aca 100644 --- a/stow/hyprland/.config/hypr/hyprland.conf +++ b/stow/hyprland/.config/hypr/hyprland.conf @@ -85,9 +85,6 @@ animations { } gestures { - workspace_swipe = true - workspace_swipe_fingers = 3 - workspace_swipe_min_fingers = false workspace_swipe_distance = 300 workspace_swipe_invert = true workspace_swipe_min_speed_to_force = 30 @@ -103,6 +100,8 @@ gestures { workspace_swipe_forever = true workspace_swipe_use_r = false + + #close_max_timeout = 1000 } group { diff --git a/stow/hyprland/.config/hypr/modes.conf b/stow/hyprland/.config/hypr/modes.conf index 61bbbf0..81d90af 100644 --- a/stow/hyprland/.config/hypr/modes.conf +++ b/stow/hyprland/.config/hypr/modes.conf @@ -1,3 +1,57 @@ +# Resizing +$mode_resize = Resize +bind = $flag, R, submap, $mode_resize +submap = $mode_resize + +bind = , $right, resizeactive, 10 0 +bind = , $up, resizeactive, 0 -10 +bind = , $left, resizeactive, -10 0 +bind = , $down, resizeactive, 0 10 + +bind = , Right , resizeactive, 10 0 +bind = , Up, resizeactive, 0 -10 +bind = , Left, resizeactive, -10 0 +bind = , Down, resizeactive, 0 10 + +bind = Shift, $right, resizeactive, 50 0 +bind = Shift, $up, resizeactive, 0 -50 +bind = Shift, $left, resizeactive, -50 0 +bind = Shift, $down, resizeactive, 0 50 + +bind = Shift, Right , resizeactive, 50 0 +bind = Shift, Up, resizeactive, 0 -50 +bind = Shift, Left, resizeactive, -50 0 +bind = Shift, Down, resizeactive, 0 50 + +bind = $flag, $right, moveactive, 10 0 +bind = $flag, $up, moveactive, 0 -10 +bind = $flag, $left, moveactive, -10 0 +bind = $flag, $down, moveactive, 0 10 + +bind = $flag, Right , moveactive, 10 0 +bind = $flag, Up, moveactive, 0 -10 +bind = $flag, Left, moveactive, -10 0 +bind = $flag, Down, moveactive, 0 10 + +bind = $flag+Shift, $right, moveactive, 50 0 +bind = $flag+Shift, $up, moveactive, 0 -50 +bind = $flag+Shift, $left, moveactive, -50 0 +bind = $flag+Shift, $down, moveactive, 0 50 + +bind = $flag+Shift, Right , moveactive, 50 0 +bind = $flag+Shift, Up, moveactive, 0 -50 +bind = $flag+Shift, Left, moveactive, -50 0 +bind = $flag+Shift, Down, moveactive, 0 50 + +gesture = 3, swipe, move +gesture = 4, swipe, resize + +bind = $flag, R, submap, reset +bind = , Escape, submap, reset +bind = , Return, submap, reset + +submap = reset + # System actions $mode_system = System (l)ock, (s)leep, (h)ibernate, (r)eboot, (Shift+s)hutdown bind = Ctrl+Alt, Delete, submap, $mode_system @@ -36,3 +90,11 @@ bind = , Return, submap, reset submap = reset +# Ignore (all) keybinds. Useful when working with Virtual Machines. +$mode_ignore=Ignore keybinds - Press Control+Alt+Insert to escape. +bind = Ctrl+Alt, Insert, submap, $mode_ignore +submap = $mode_ignore + +bind = Ctrl+Alt, Insert, submap, reset + +submap = reset diff --git a/stow/waybar/.config/waybar/config.jsonc b/stow/waybar/.config/waybar/config.jsonc index a83d47c..addef9e 100644 --- a/stow/waybar/.config/waybar/config.jsonc +++ b/stow/waybar/.config/waybar/config.jsonc @@ -23,18 +23,17 @@ ], "include": [ "~/.config/waybar/modules.json" - ] + ], + "start_hidden": true }, /* Toggle this bar, contains all information */ { "name": "toggle", - "mode": "hide", - "ipc": true, "position": "top", "height": 26, /* Show this bar on top of the other one, seemingly replacing it. */ - "margin": "-26px 0 0 0", + /*"margin": "-26px 0 0 0",*/ "modules-left": [ "custom/meta", "sway/window", @@ -59,6 +58,7 @@ ], "include": [ "~/.config/waybar/modules.json" - ] + ], + "reload_style_on_change": true } ]