sway: simplify config

This commit is contained in:
2024-02-15 14:25:45 +00:00
parent 5090c4e88c
commit 0394aa65e9

View File

@@ -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: <https://flatpak.github.io/xdg-desktop-portal/docs/portals.conf.html>
[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: <https://flatpak.github.io/xdg-desktop-portal/docs/portals.conf.html>
[preferred]
default=wlr;gtk
'';
".config/sway/config".symlink.target = pkgs.callPackage ./sway-config.nix {
inherit config;
swayCfg = cfg.config;
};
};
})
];
}