diff --git a/home-manager/apps/discord.nix b/home-manager/apps/discord.nix new file mode 100644 index 0000000..3e5f2f9 --- /dev/null +++ b/home-manager/apps/discord.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + discord + ]; + + xdg.desktopEntries = { + discord = { + name = "Discord"; + # Custom options to reduce flickering under wayland. + exec = "discord --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu"; + }; + }; +} diff --git a/home-manager/features/hyprland.nix b/home-manager/features/hyprland.nix index 69bc80e..7138513 100644 --- a/home-manager/features/hyprland.nix +++ b/home-manager/features/hyprland.nix @@ -44,6 +44,9 @@ # For window theming "QT_QPA_PLATFORMTHEME,qt6ct # for Qt apps" "GTK_THEME,Adwaita-dark" + + # Tell electron apps they should use OZone for Wayland + "ELECTRON_OZONE_PLATFORM_HINT,auto" ]; general = { diff --git a/home-manager/features/linux-desktop.nix b/home-manager/features/linux-desktop.nix index c758e39..b4a9884 100644 --- a/home-manager/features/linux-desktop.nix +++ b/home-manager/features/linux-desktop.nix @@ -6,10 +6,16 @@ ./nix.nix ./rofi/rofi.nix ../apps/element.nix + ../apps/discord.nix ./terminal.nix ]; home.packages = with pkgs; [ + # Desktop Applications + signal-desktop + firefox + + # Common utilities feh networkmanagerapplet # network control hyprlock # lock screen @@ -34,7 +40,7 @@ # Hint for electron apps to use wayland home.sessionVariables.NIXOS_OZONE_WL = "1"; - # Micelaneious config files + # Miscelaneous config files home.file = { ".XCompose".source = ./config/XCompose; }; diff --git a/home-manager/features/notes.nix b/home-manager/features/notes.nix index 346c4f0..97e06fc 100644 --- a/home-manager/features/notes.nix +++ b/home-manager/features/notes.nix @@ -1,5 +1,9 @@ -{ lib, ... }: +{ lib, pkgs, ... }: { + home.packages = with pkgs; [ + obsidian + ]; + services.syncthing = { enable = true; tray = { diff --git a/system/hosts/altair/drew.nix b/system/hosts/altair/drew.nix index 8dfc8aa..7db431e 100644 --- a/system/hosts/altair/drew.nix +++ b/system/hosts/altair/drew.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: let monitors = [ "DP-1" @@ -29,14 +29,6 @@ in userEmail = "drew.haven@gmail.com"; }; - home.packages = with pkgs; [ - # Applications - discord - signal-desktop - obsidian - firefox - ]; - # Set up eww here because it's based on the monitor configuration # Eww is idempotent, so it's fine to just run it on every reload to make sure things are open wayland.windowManager.hyprland.settings.execr-once = [ diff --git a/system/hosts/vega/drew.nix b/system/hosts/vega/drew.nix index bcc4280..de618b7 100644 --- a/system/hosts/vega/drew.nix +++ b/system/hosts/vega/drew.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { imports = map (x: ../../../home-manager + x) [ "/features/development/development.nix" @@ -20,14 +20,6 @@ userEmail = "periodic@blazestar.net"; }; - home.packages = with pkgs; [ - # Applications - discord - signal-desktop - obsidian - firefox - ]; - # Set up eww here because it's based on the monitor configuration # Eww is idempotent, so it's fine to just run it on every reload to make sure things are open wayland.windowManager.hyprland.settings.execr-once = [