From 228d20cbbf8c901f35f3e935aabb38f7ecd83492 Mon Sep 17 00:00:00 2001 From: cnst Date: Wed, 31 Jul 2024 09:22:34 +0200 Subject: [PATCH] xdg fixes --- home/core/gui/hypr/land/cnst/startup.nix | 2 +- home/core/gui/xdg/default.nix | 6 +----- nixos/core/hyprland.nix | 12 +----------- nixos/core/xdg.nix | 14 ++++++++++++++ nixos/default.nix | 1 + 5 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 nixos/core/xdg.nix diff --git a/home/core/gui/hypr/land/cnst/startup.nix b/home/core/gui/hypr/land/cnst/startup.nix index 17ce7aed..b7105e5f 100644 --- a/home/core/gui/hypr/land/cnst/startup.nix +++ b/home/core/gui/hypr/land/cnst/startup.nix @@ -3,7 +3,7 @@ exec-once = [ # STARTUP # exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP - # "systemctl --user start polkit-gnome-authentication-agent-1" + "systemctl --user start polkit-gnome-authentication-agent-1" # exec-once = lxqt-policykit-agent & "waybar" "pamixer --set-volume 50" diff --git a/home/core/gui/xdg/default.nix b/home/core/gui/xdg/default.nix index b7507c07..bba3feb2 100644 --- a/home/core/gui/xdg/default.nix +++ b/home/core/gui/xdg/default.nix @@ -1,8 +1,4 @@ -{ - pkgs, - config, - ... -}: { +{config, ...}: { xdg = { userDirs = { enable = true; diff --git a/nixos/core/hyprland.nix b/nixos/core/hyprland.nix index bce5107d..edc7e5dc 100644 --- a/nixos/core/hyprland.nix +++ b/nixos/core/hyprland.nix @@ -1,17 +1,7 @@ -{ - inputs, - lib, - pkgs, - ... -}: { +{inputs, ...}: { imports = [ inputs.hyprland.nixosModules.default ]; environment.variables.NIXOS_OZONE_WL = "1"; programs.hyprland.enable = true; - xdg.portal = { - enable = true; - config.common.default = lib.mkForce ["hyprland" "kde"]; - extraPortals = [pkgs.xdg-desktop-portal-kde]; - }; } diff --git a/nixos/core/xdg.nix b/nixos/core/xdg.nix new file mode 100644 index 00000000..209796f4 --- /dev/null +++ b/nixos/core/xdg.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + config = { + common.default = ["gtk"]; + hyprland.default = ["gtk" "hyprland"]; + }; + + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + ]; + }; +} diff --git a/nixos/default.nix b/nixos/default.nix index 915dc7df..11054f33 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,6 +1,7 @@ let desktop = [ ./core/hyprland.nix + ./core/xdg.nix ./core/zsh.nix ./core/fonts.nix ./core/home-manager.nix