panacea/modules/gui.nix

131 lines
2.4 KiB
Nix

{ config, lib, pkgs, ... }:
with pkgs;
{
# Display manager
services.xserver.enable = true;
services.xserver.displayManager = {
defaultSession = "sway";
autoLogin = {
enable = true;
user = "coolneng";
};
lightdm = {
enable = true;
greeter.enable = false;
};
};
# Window manager
programs.sway = {
enable = true;
extraPackages = [
xwayland
swaylock
swayidle
swaybg
rofi-wayland
waybar
clipman
wl-clipboard
grim
slurp
imv
kanshi
kitty
qt5.qtwayland
];
extraSessionCommands = ''
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
export GRIM_DEFAULT_DIR=/home/coolneng/Photos/Screenshots
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export SDL_VIDEODRIVER=wayland
export GTK_THEME=Adapta-Eta
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
'';
};
# Backlight
programs.light.enable = true;
# Blue light filter
location = {
latitude = 51.05;
longitude = 3.71;
provider = "manual";
};
services.redshift = {
enable = true;
package = gammastep;
executable = "/bin/gammastep";
temperature = {
day = 6500;
night = 5300;
};
};
# Bar
programs.waybar.enable = true;
# GPG agent
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gnome3";
};
# Tmux
programs.tmux = {
enable = true;
historyLimit = 5000;
keyMode = "vi";
shortcut = "x";
terminal = "screen-256";
baseIndex = 1;
};
# Automount external storage
systemd.mounts = [
# USB
{
what = "/dev/sda1";
where = "/usb";
mountConfig = { TimeoutSec = "5"; };
}
# SD card
{
what = "/dev/mmcblk0p1";
where = "/sdcard";
mountConfig = { TimeoutSec = "5"; };
}
];
systemd.automounts = [
# USB
{
where = "/usb";
automountConfig = { TimeoutIdleSec = "5"; };
wantedBy = [ "default.target" ];
}
# SD card
{
where = "/sdcard";
automountConfig = { TimeoutIdleSec = "5"; };
wantedBy = [ "default.target" ];
}
];
# Integrate pass with the browser
programs.browserpass.enable = true;
# Enable WebRTC screensharing
xdg.portal = {
enable = true;
extraPortals = [ xdg-desktop-portal-wlr ];
};
}