btw i use nix
1{
2 pkgs,
3 config,
4 lib,
5 ...
6}:
7
8let
9 cfg = config.custom.gui;
10in
11{
12 options.custom.gui.sway = lib.mkEnableOption "sway";
13
14 config = lib.mkIf cfg.sway {
15 home-manager.users.${config.custom.username} =
16 { config, ... }:
17 {
18 config.custom.gui.sway.enable = true;
19 };
20
21 programs.sway = {
22 enable = true;
23 wrapperFeatures.gtk = true; # so that gtk works properly
24 extraPackages = with pkgs; [
25 jq
26 swaylock
27 swayidle
28 wl-clipboard
29 clipman
30 wtype
31 gammastep
32 waybar
33 alacritty
34 wofi
35 wofi-emoji
36 wdisplays
37 wf-recorder
38 grim
39 slurp
40 swappy
41 dunst
42 kanshi
43 ];
44 };
45
46 # TODO read this
47 # https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in
48 xdg.portal = {
49 enable = true;
50 wlr.enable = true;
51 config.common.default = "*";
52 };
53
54 services.geoclue2.appConfig.gammastep = {
55 isAllowed = true;
56 isSystem = false;
57 };
58 services.geoclue2.appConfig.timewall = {
59 isAllowed = true;
60 isSystem = false;
61 };
62 };
63}