diff --git a/home/allegro.nix b/home/allegro.nix new file mode 100644 index 0000000..459bc97 --- /dev/null +++ b/home/allegro.nix @@ -0,0 +1,47 @@ +{ config, lib, pkgs, ... }: { + xdg = { + configFile."systemd/user/dbus-broker.service".source = + "${pkgs.dbus-broker}/share/systemd/user/dbus-broker.service"; + configFile."systemd/user/at-spi-dbus-bus.service".source = + "${pkgs.at-spi2-core}/lib/systemd/user/at-spi-dbus-bus.service"; + dataFile."dbus-1/services/org.a11y.Bus.service".source = + "${pkgs.at-spi2-core}/share/dbus-1/services/org.a11y.Bus.service"; + dataFile."dbus-1/accessibility-services/org.a11y.atspi.Registry.service".source = + "${pkgs.at-spi2-core}/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service"; + + configFile."systemd/user/xdg-desktop-portal.service".source = + "${pkgs.xdg-desktop-portal}/lib/systemd/user/xdg-desktop-portal.service"; + configFile."systemd/user/xdg-desktop-portal-gtk.service".source = + "${pkgs.xdg-desktop-portal-gtk}/lib/systemd/user/xdg-desktop-portal-gtk.service"; + configFile."systemd/user/xdg-desktop-portal-hyprland.service".source = + "${pkgs.xdg-desktop-portal-hyprland}/lib/systemd/user/xdg-desktop-portal-hyprland.service"; + dataFile."share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service".source = + "${pkgs.xdg-desktop-portal-hyprland}share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service"; + dataFile."systemd/user/pipewire.service".source = + "${pkgs.pipewire}/share/systemd/user/pipewire.service"; + dataFile."systemd/user/pipewire-pulse.service".source = + "${pkgs.pipewire}/share/systemd/user/pipewire-pulse.service"; + dataFile."systemd/user/filter-chain.service".source = + "${pkgs.pipewire}/share/systemd/user/filter-chain.service"; + + dataFile."systemd/user/pipewire.socket".source = + "${pkgs.pipewire}/share/systemd/user/pipewire.socket"; + dataFile."systemd/user/pipewire-pulse.socket".source = + "${pkgs.pipewire}/share/systemd/user/pipewire-pulse.socket"; + + portal = { + enable = true; + + # xdgOpenUsePortal = true; + extraPortals = + [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; + configPackages = + [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; + # config.common.default = "*"; + config = { + hyprland = { default = [ "gtk,hyprland" ]; }; + common = { default = [ "gtk,hyprland" ]; }; + }; + }; + }; +} diff --git a/home/hyprland.nix b/home/hyprland.nix index f3d0481..400ee5f 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -1,50 +1,4 @@ { config, lib, pkgs, pkgs-unstable, pkgs-24_05, variant, ... }: { - xdg = lib.attrsets.optionalAttrs (variant == "allegro") { - configFile."systemd/user/dbus-broker.service".source = - "${pkgs.dbus-broker}/share/systemd/user/dbus-broker.service"; - configFile."systemd/user/at-spi-dbus-bus.service".source = - "${pkgs.at-spi2-core}/lib/systemd/user/at-spi-dbus-bus.service"; - dataFile."dbus-1/services/org.a11y.Bus.service".source = - "${pkgs.at-spi2-core}/share/dbus-1/services/org.a11y.Bus.service"; - dataFile."dbus-1/accessibility-services/org.a11y.atspi.Registry.service".source = - "${pkgs.at-spi2-core}/share/dbus-1/accessibility-services/org.a11y.atspi.Registry.service"; - - configFile."systemd/user/xdg-desktop-portal.service".source = - "${pkgs.xdg-desktop-portal}/lib/systemd/user/xdg-desktop-portal.service"; - configFile."systemd/user/xdg-desktop-portal-gtk.service".source = - "${pkgs.xdg-desktop-portal-gtk}/lib/systemd/user/xdg-desktop-portal-gtk.service"; - configFile."systemd/user/xdg-desktop-portal-hyprland.service".source = - "${pkgs.xdg-desktop-portal-hyprland}/lib/systemd/user/xdg-desktop-portal-hyprland.service"; - dataFile."share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service".source = - "${pkgs.xdg-desktop-portal-hyprland}share/dbus-1/services/org.freedesktop.impl.portal.desktop.hyprland.service"; - dataFile."systemd/user/pipewire.service".source = - "${pkgs.pipewire}/share/systemd/user/pipewire.service"; - dataFile."systemd/user/pipewire-pulse.service".source = - "${pkgs.pipewire}/share/systemd/user/pipewire-pulse.service"; - dataFile."systemd/user/filter-chain.service".source = - "${pkgs.pipewire}/share/systemd/user/filter-chain.service"; - - dataFile."systemd/user/pipewire.socket".source = - "${pkgs.pipewire}/share/systemd/user/pipewire.socket"; - dataFile."systemd/user/pipewire-pulse.socket".source = - "${pkgs.pipewire}/share/systemd/user/pipewire-pulse.socket"; - - portal = { - enable = true; - - # xdgOpenUsePortal = true; - extraPortals = - [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; - configPackages = - [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ]; - # config.common.default = "*"; - config = { - hyprland = { default = [ "gtk,hyprland" ]; }; - common = { default = [ "gtk,hyprland" ]; }; - }; - }; - }; - home.sessionVariables = { NIXOS_OZONE_WL = "1"; GDK_BACKEND = "wayland,x11";