dotfiles/nixos/sway/default.nix
Cyryl Płotnicki 635f5902aa
Some checks are pending
use nix / build (push) Waiting to run
cleanup, make checks pass
2024-04-27 11:33:38 +01:00

109 lines
2.9 KiB
Nix

{
config,
pkgs,
...
}: let
mod = "Mod4";
in {
services.dbus.packages = with pkgs; [];
programs.dconf.enable = true;
systemd.defaultUnit = "graphical.target";
security.polkit.enable = true;
qt5.platformTheme = "qt5ct";
environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
'';
home-manager.users.cyryl = {...}: {
programs.mako.enable = true;
imports = [./keybindings.nix ../home-manager/programs/alacritty.nix];
home = {
pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
sessionVariables = {
XDG_CURRENT_DESKTOP = "Unity";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland-egl";
QT_WAYLAND_FORCE_DPI = "physical";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
packages = with pkgs; [
firefox-wayland
wl-clipboard
clipman
wofi
libappindicator-gtk3
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
];
file = {
".config/wofi/style.css".source = ../../.config/wofi/style.css;
".config/waybar/config".source = ../../.config/waybar/config;
".config/waybar/style.css".source =
../../.config/waybar/style.css;
};
};
services.udiskie.enable = true;
xsession.preferStatusNotifierItems = true;
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
extraConfig = ''
default_border none
'';
extraSessionCommands = "";
config = {
modifier = "${mod}";
menu = "${pkgs.wofi}/bin/wofi --show drun,run";
terminal = "${pkgs.alacritty}/bin/alacritty";
workspaceLayout = "tabbed";
window = {
hideEdgeBorders = "both";
titlebar = false;
border = 0;
};
bars = [
{
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
startup = [
{
command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store";
}
{command = "${pkgs.clipman}/bin/clipman restore";}
{
command = ''
swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83'
'';
}
];
output.eDP-1.scale = "1.7";
input."1:1:AT_Translated_Set_2_keyboard" = {
xkb_layout = "pl";
xkb_options = "caps:ctrl_modifier";
};
input."2:7:SynPS/2_Synaptics_TouchPad" = {tap = "enabled";};
};
};
};
}