diff --git a/config/optional/wayland.nix b/config/optional/wayland.nix index 5881ccb..0f9f101 100644 --- a/config/optional/wayland.nix +++ b/config/optional/wayland.nix @@ -10,4 +10,19 @@ lib.optionalAttrs (!minimal) { wdisplays wl-clipboard ]; + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + config.common = { + default = ["gtk" "hyprland"]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + "org.freedesktop.impl.portal.ScreenCast" = ["hyprland"]; + "org.freedesktop.impl.portal.Screenshot" = ["hyprland"]; + "org.freedesktop.portal.FileChooser" = ["xdg-desktop-portal-gtk"]; + }; + extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-gtk + ]; + }; } diff --git a/config/services/ddclient.nix b/config/services/ddclient.nix index 8d7c641..ec60aa1 100644 --- a/config/services/ddclient.nix +++ b/config/services/ddclient.nix @@ -10,7 +10,8 @@ zone = config.secrets.secrets.global.domains.web; protocol = "Cloudflare"; username = "token"; - #apparently this module has a default config for both v4 and v6 now + usev4 = "webv4, webv4='https://cloudflare.com/cdn-cgi/trace', webv4-skip='ip='"; + usev6 = ""; passwordFile = config.age.secrets.cloudflare_token_dns.path; domains = [config.secrets.secrets.global.domains.web]; }; diff --git a/hosts/desktopnix/default.nix b/hosts/desktopnix/default.nix index 15e16e6..2c6d896 100644 --- a/hosts/desktopnix/default.nix +++ b/hosts/desktopnix/default.nix @@ -47,7 +47,10 @@ enable = true; dockerCompat = true; }; - services.logkeys.enable = true; + services.logkeys = { + enable = true; + device = "/dev/input/event15"; + }; boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"]; nix.settings.system-features = ["kvm" "nixos-test"]; diff --git a/users/common/graphical/wayland/hyprland.nix b/users/common/graphical/wayland/hyprland.nix new file mode 100644 index 0000000..8e43d63 --- /dev/null +++ b/users/common/graphical/wayland/hyprland.nix @@ -0,0 +1,115 @@ +{ + pkgs, + lib, + nixosConfig, + ... +}: let + inherit (lib) mkMerge optionals elem; +in { + wayland.windowManager.hyprland = { + enable = true; + settings = mkMerge [ + { + input = { + kb_layout = "de"; + kb_variant = "nodeadkeys"; + follow_mouse = 2; + numlock_by_default = true; + repeat_rate = 60; + repeat_delay = 235; + # Only change focus on mouse click + float_switch_override_focus = 0; + accel_profile = "flat"; + + touchpad = { + natural_scroll = "true"; + disable_while_typing = true; + clickfinger_behavior = true; + scroll_factor = 0.7; + }; + }; + + general = { + gaps_in = 1; + gaps_out = 0; + allow_tearing = true; + }; + + cursor.no_warps = true; + debug.disable_logs = false; + env = + optionals (elem "nvidia" nixosConfig.services.xserver.videoDrivers) [ + # See https://wiki.hyprland.org/Nvidia/ + "LIBVA_DRIVER_NAME,nvidia" + "XDG_SESSION_TYPE,wayland" + "GBM_BACKEND,nvidia-drm" + "__GLX_VENDOR_LIBRARY_NAME,nvidia" + ] + ++ [ + "NIXOS_OZONE_WL,1" + "MOZ_ENABLE_WAYLAND,1" + "MOZ_WEBRENDER,1" + "_JAVA_AWT_WM_NONREPARENTING,1" + "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" + "QT_QPA_PLATFORM,wayland" + "SDL_VIDEODRIVER,wayland" + "GDK_BACKEND,wayland" + ]; + bindm = [ + # mouse movements + "SUPER, mouse:272, movewindow" + "SUPER, mouse:273, resizewindow" + "SUPER ALT, mouse:272, resizewindow" + ]; + animations = { + enabled = true; + animation = [ + "windows, 1, 4, default, slide" + "windowsOut, 1, 4, default, slide" + "windowsMove, 1, 4, default" + "border, 1, 2, default" + "fade, 1, 4, default" + "fadeDim, 1, 4, default" + "workspaces, 1, 4, default" + ]; + }; + + decoration.rounding = 4; + exec-once = [ + "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" + "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" + "systemctl --user restart xdg-desktop-portal.service" + "${pkgs.waybar}/bin/waybar" + "${pkgs.swaynotificationcenter}/bin/swaync" + ]; + misc = { + vfr = 1; + vrr = 1; + disable_hyprland_logo = true; + mouse_move_focuses_monitor = false; + }; + extraConfig = '' + submap=resize + binde=,right,resizeactive,80 0 + binde=,left,resizeactive,-80 0 + binde=,up,resizeactive,0 -80 + binde=,down,resizeactive,0 80 + binde=SHIFT,right,resizeactive,10 0 + binde=SHIFT,left,resizeactive,-10 0 + binde=SHIFT,up,resizeactive,0 -10 + binde=SHIFT,down,resizeactive,0 10 + bind=,return,submap,reset + bind=,escape,submap,reset + submap=reset + + env=WLR_DRM_NO_ATOMIC,1 + windowrulev2 = immediate, class:^(cs2)$ + + binds { + focus_preferred_method = 1 + } + ''; + } + ]; + }; +} diff --git a/users/common/programs/gdb.nix b/users/common/programs/gdb.nix index 6b38007..5c14861 100644 --- a/users/common/programs/gdb.nix +++ b/users/common/programs/gdb.nix @@ -1,5 +1,19 @@ -{pkgs, ...}: { - home.packages = [pkgs.pwndbg]; +{pkgs, ...}: let + pwndbgWithDebuginfod = + (pkgs.pwndbg.override { + gdb = pkgs.gdb.override { + enableDebuginfod = true; + }; + }) + .overrideAttrs (_finalAttrs: previousAttrs: { + installPhase = + previousAttrs.installPhase + + '' + ln -s $out/bin/pwndbg $out/bin/gdb + ''; + }); +in { + home.packages = [pwndbgWithDebuginfod]; home.enableDebugInfo = true; xdg.configFile.gdbinit = { target = "gdb/gbdinit"; diff --git a/users/patrick/impermanence.nix b/users/patrick/impermanence.nix index 1da3f13..215c7e7 100644 --- a/users/patrick/impermanence.nix +++ b/users/patrick/impermanence.nix @@ -23,6 +23,7 @@ # for electron signal app state ".config/Signal" ".config/discord" + ".config/WebCord" ".local/share/TelegramDesktop" # Folders for steam diff --git a/users/patrick/patrick.nix b/users/patrick/patrick.nix index e18abe2..e3df1d8 100644 --- a/users/patrick/patrick.nix +++ b/users/patrick/patrick.nix @@ -4,6 +4,7 @@ packages = with pkgs; [ nextcloud-client discord + webcord netflix xournalpp galaxy-buds-client