Skip to content

Commit

Permalink
metal: fix sway
Browse files Browse the repository at this point in the history
  • Loading branch information
pborzenkov committed Aug 31, 2024
1 parent 0e0117a commit 813ed1f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
1 change: 0 additions & 1 deletion home/modules/wm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ in {

xdg.portal = {
enable = true;
config.common.default = "*";
};
};
}
36 changes: 24 additions & 12 deletions home/modules/wm/sway/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@ in {
wayland.windowManager.sway = {
enable = true;
systemd.enable = true;
extraSessionCommands = ''
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SDL_VIDEODRIVER=wayland
export ANKI_WAYLAND=1
export GRIM_DEFAULT_DIR="${config.home.homeDirectory}/down"
'';
extraSessionCommands =
''
export MOZ_ENABLE_WAYLAND=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SDL_VIDEODRIVER=wayland
export ANKI_WAYLAND=1
export GRIM_DEFAULT_DIR="${config.home.homeDirectory}/down"
''
+ lib.optionalString config.pbor.basetools.pass.enable ''
export PASSWORD_STORE_DIR="${config.programs.password-store.settings.PASSWORD_STORE_DIR}"
'';
wrapperFeatures = {
base = true;
gtk = true;
Expand Down Expand Up @@ -191,9 +195,17 @@ in {
};
stylix.targets.sway.enable = true;

xdg.portal.extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
xdg.portal = {
config.sway = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
"org.freedesktop.impl.portal.Inhibit" = "none";
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
};
}
6 changes: 6 additions & 0 deletions nixos/machines/metal/login.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@
};
};
};

programs.dconf.enable = true;
security = {
polkit.enable = true;
pam.services.swaylock = {};
};
}

0 comments on commit 813ed1f

Please sign in to comment.