nixos-config/modules/users/sway/default.nix

45 lines
1,012 B
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
with lib;
let cfg = config.erwin.sway;
in
{
options.erwin.sway = {
enable = mkEnableOption {
description = "Enable sway";
};
};
config = mkIf (cfg.enable) {
wayland.windowManager.sway = {
enable = true;
config = import ./sway.nix {
inherit pkgs config lib;
};
extraSessionCommands =
''
export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_QPA_PLATFORMTHEME=qt5ct
export SDL_VIDEODRIVER=wayland
export SSH_AUTH_SOCK="''${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
'';
wrapperFeatures = {
base = true;
gtk = true;
};
xwayland = true;
};
programs.waybar = import ./waybar.nix { inherit pkgs config lib; };
home.file.".wallpapers".source = ./wallpapers;
};
}