From 0394aa65e9f62b80ba4a68b46f46a5429e794291 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 15 Feb 2024 14:25:45 +0000 Subject: [PATCH] sway: simplify config --- hosts/modules/gui/sway/default.nix | 52 +++++++++++++++--------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/hosts/modules/gui/sway/default.nix b/hosts/modules/gui/sway/default.nix index 6b418e93a..baf689ce6 100644 --- a/hosts/modules/gui/sway/default.nix +++ b/hosts/modules/gui/sway/default.nix @@ -174,6 +174,32 @@ in ]; secrets.".config/sane-sway/snippets.txt" = ../../../../secrets/common/snippets.txt.bin; + + fs.".config/xdg-desktop-portal/sway-portals.conf".symlink.text = '' + # portals.conf docs: + [preferred] + default=wlr;gtk + ''; + + fs.".config/sway/config".symlink.target = pkgs.callPackage ./sway-config.nix { + inherit config; + swayCfg = cfg.config; + }; + + services.sway-session = { + description = "no-op unit to signal that sway is operational"; + documentation = [ + "https://github.com/swaywm/sway/issues/7862" + "https://github.com/alebastr/sway-systemd" + ]; + bindsTo = [ "graphical-session.target" ]; + serviceConfig = { + ExecStart = "${pkgs.coreutils}/bin/true"; + Type = "oneshot"; + RemainAfterExit = true; + }; + }; + }; } @@ -286,32 +312,6 @@ in xdg.portal.enable = false; xdg.menus.enable = false; #< links /share/applications, and a bunch of other empty (i.e. unused) dirs - sane.user.services.sway-session = { - description = "no-op unit to signal that sway is operational"; - documentation = [ - "https://github.com/swaywm/sway/issues/7862" - "https://github.com/alebastr/sway-systemd" - ]; - bindsTo = [ "graphical-session.target" ]; - serviceConfig = { - ExecStart = "${pkgs.coreutils}/bin/true"; - Type = "oneshot"; - RemainAfterExit = true; - }; - }; - - sane.user.fs = { - ".config/xdg-desktop-portal/sway-portals.conf".symlink.text = '' - # portals.conf docs: - [preferred] - default=wlr;gtk - ''; - - ".config/sway/config".symlink.target = pkgs.callPackage ./sway-config.nix { - inherit config; - swayCfg = cfg.config; - }; - }; }) ]; }