From 3e85a281ec997ddfac4601c15e6851e6dd31bfb6 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Tue, 5 Aug 2025 23:22:16 -0600 Subject: add sway module --- modules/sway/sys.nix | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/sway/sys.nix (limited to 'modules/sway/sys.nix') diff --git a/modules/sway/sys.nix b/modules/sway/sys.nix new file mode 100644 index 0000000..9c8b664 --- /dev/null +++ b/modules/sway/sys.nix @@ -0,0 +1,45 @@ +{ + pkgs, + lib, + ... +}: { + services.libinput.enable = true; + hardware.graphics.enable = true; + + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-gtk]; + xdgOpenUsePortal = true; + + # warning: xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you + # should either set `xdg.portal.config` or `xdg.portal.configPackages` + # to specify which portal backend to use for the requested interface. + # + # https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in + # + # If you simply want to keep the behaviour in < 1.17, which uses the first + # portal implementation found in lexicographical order, use the following: + # + # xdg.portal.config.common.default = "*"; + config.common.default = "*"; + }; + + environment = { + sessionVariables.NIXOS_OZONE_WL = "1"; + + systemPackages = with pkgs; [ + qt5.qtwayland + qt6.qtwayland + ]; + }; + + programs = { + gtklock = { + enable = lib.mkDefault true; + + config = {}; + modules = []; + }; + }; +} -- cgit v1.2.3