dotfiles/nixos/sway/default.nix

102 lines
2.8 KiB
Nix
Raw Normal View History

2023-01-11 12:00:28 +00:00
{ config, pkgs, ... }:
let mod = "Mod4";
2022-03-10 12:25:23 +00:00
in {
2023-01-11 12:00:28 +00:00
services.dbus.packages = with pkgs; [ ];
2021-11-22 19:32:26 +00:00
programs.dconf.enable = true;
systemd.defaultUnit = "graphical.target";
2023-01-11 12:00:28 +00:00
security.polkit.enable = true;
qt5.platformTheme = "qt5ct";
2021-01-23 09:58:57 +00:00
2022-04-24 10:03:47 +01:00
environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi
'';
2023-01-11 12:00:28 +00:00
home-manager.users.cyryl = { ... }: {
2021-11-22 19:32:26 +00:00
programs.mako.enable = true;
2020-07-29 20:25:47 +01:00
2023-01-11 12:00:28 +00:00
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";
};
};
2020-07-29 20:25:47 +01:00
2021-11-22 19:32:26 +00:00
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "Unity";
SDL_VIDEODRIVER = "wayland";
QT_QPA_PLATFORM = "wayland-egl";
QT_WAYLAND_FORCE_DPI = "physical";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
};
2020-07-29 20:25:47 +01:00
2021-11-22 19:32:26 +00:00
home.packages = with pkgs; [
firefox-wayland
wl-clipboard
clipman
wofi
libappindicator-gtk3
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
];
2020-07-29 20:25:47 +01:00
2021-11-22 19:32:26 +00:00
services.udiskie.enable = true;
xsession.preferStatusNotifierItems = true;
2020-08-16 11:33:26 +01:00
2021-11-22 19:32:26 +00:00
home.file.".config/wofi/style.css".source = ../../.config/wofi/style.css;
home.file.".config/waybar/config".source = ../../.config/waybar/config;
2022-03-10 12:25:23 +00:00
home.file.".config/waybar/style.css".source =
../../.config/waybar/style.css;
2021-11-22 19:32:26 +00:00
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
extraConfig = ''
default_border none
'';
2022-03-10 12:25:23 +00:00
extraSessionCommands = "";
2021-11-22 19:32:26 +00:00
config = {
modifier = "${mod}";
menu = "${pkgs.wofi}/bin/wofi --show drun,run";
2023-01-11 12:00:28 +00:00
terminal = "${pkgs.alacritty}/bin/alacritty";
2021-11-22 19:32:26 +00:00
workspaceLayout = "tabbed";
window = {
hideEdgeBorders = "both";
titlebar = false;
border = 0;
};
2023-01-11 12:00:28 +00:00
bars = [{
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}];
2022-03-10 12:25:23 +00:00
startup = [
2021-11-22 19:32:26 +00:00
{
2023-01-11 12:00:28 +00:00
command =
"${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store";
2021-11-22 19:32:26 +00:00
}
2023-01-11 12:00:28 +00:00
{ command = "${pkgs.clipman}/bin/clipman restore"; }
2021-11-22 19:32:26 +00:00
{
2022-03-10 12:25:23 +00:00
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'
2022-12-19 09:09:08 +00:00
'';
2021-11-22 19:32:26 +00:00
}
];
output.eDP-1.scale = "1.7";
input."1:1:AT_Translated_Set_2_keyboard" = {
xkb_layout = "pl";
xkb_options = "caps:ctrl_modifier";
};
2023-01-11 12:00:28 +00:00
input."2:7:SynPS/2_Synaptics_TouchPad" = { tap = "enabled"; };
2020-07-29 20:25:47 +01:00
};
};
2021-11-22 19:32:26 +00:00
};
}