2020-04-22 22:13:03 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2021-08-08 20:56:16 +02:00
|
|
|
{
|
2020-04-22 22:13:03 +02:00
|
|
|
# Display manager
|
2020-05-09 01:17:35 +02:00
|
|
|
services.xserver.enable = true;
|
2020-05-08 21:53:52 +02:00
|
|
|
services.xserver.displayManager = {
|
2020-04-22 22:13:03 +02:00
|
|
|
defaultSession = "sway";
|
2020-07-13 23:33:17 +02:00
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "coolneng";
|
|
|
|
};
|
2020-05-11 06:39:22 +02:00
|
|
|
lightdm = {
|
2020-04-22 22:13:03 +02:00
|
|
|
enable = true;
|
2020-11-25 00:24:04 +01:00
|
|
|
greeter.enable = false;
|
2020-04-22 22:13:03 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Window manager
|
|
|
|
programs.sway = {
|
|
|
|
enable = true;
|
2020-09-21 14:23:35 +02:00
|
|
|
extraPackages = with pkgs; [
|
|
|
|
xwayland
|
|
|
|
swaylock
|
|
|
|
swayidle
|
|
|
|
swaybg
|
|
|
|
rofi
|
|
|
|
waybar
|
|
|
|
clipman
|
|
|
|
wl-clipboard
|
|
|
|
grim
|
|
|
|
slurp
|
|
|
|
imv
|
|
|
|
kanshi
|
|
|
|
kitty
|
2020-11-25 00:28:34 +01:00
|
|
|
qt5.qtwayland
|
2020-04-22 22:13:03 +02:00
|
|
|
];
|
|
|
|
extraSessionCommands = ''
|
2020-05-16 05:20:59 +02:00
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
2020-11-14 16:11:00 +01:00
|
|
|
export MOZ_USE_XINPUT2=1
|
2020-04-22 22:13:03 +02:00
|
|
|
export GRIM_DEFAULT_DIR=/home/coolneng/Photos/Screenshots
|
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
|
|
export QT_QPA_PLATFORM=wayland
|
2020-11-14 16:11:00 +01:00
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
2020-04-22 22:13:03 +02:00
|
|
|
export SDL_VIDEODRIVER=wayland
|
2020-05-19 13:26:50 +02:00
|
|
|
export GTK_THEME=Adapta-Eta
|
2020-11-14 16:11:00 +01:00
|
|
|
export XDG_SESSION_TYPE=wayland
|
|
|
|
export XDG_CURRENT_DESKTOP=sway
|
2020-04-22 22:13:03 +02:00
|
|
|
'';
|
|
|
|
};
|
2020-05-10 03:13:30 +02:00
|
|
|
|
2020-05-09 18:45:10 +02:00
|
|
|
# Backlight
|
|
|
|
programs.light.enable = true;
|
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
# Blue light filter
|
2020-05-11 06:39:22 +02:00
|
|
|
location = {
|
2021-11-04 00:24:41 +01:00
|
|
|
latitude = 51.05;
|
|
|
|
longitude = 3.71;
|
2020-05-11 06:39:22 +02:00
|
|
|
provider = "manual";
|
|
|
|
};
|
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
services.redshift = {
|
2022-01-07 21:51:44 +01:00
|
|
|
package = pkgs.gammastep;
|
2020-04-22 22:13:03 +02:00
|
|
|
enable = true;
|
|
|
|
temperature = {
|
|
|
|
day = 6500;
|
2020-05-11 06:39:22 +02:00
|
|
|
night = 5300;
|
2020-04-22 22:13:03 +02:00
|
|
|
};
|
|
|
|
};
|
2020-05-09 18:45:10 +02:00
|
|
|
|
2020-04-22 22:13:03 +02:00
|
|
|
# Bar
|
|
|
|
programs.waybar.enable = true;
|
2020-05-10 03:13:30 +02:00
|
|
|
|
|
|
|
# GPG agent
|
2020-05-14 02:09:23 +02:00
|
|
|
programs.gnupg.agent = {
|
|
|
|
enable = true;
|
2021-08-17 15:30:05 +02:00
|
|
|
pinentryFlavor = "gnome3";
|
2020-05-14 02:09:23 +02:00
|
|
|
};
|
2020-05-15 03:43:23 +02:00
|
|
|
|
|
|
|
# Tmux
|
|
|
|
programs.tmux = {
|
|
|
|
enable = true;
|
|
|
|
historyLimit = 5000;
|
|
|
|
keyMode = "vi";
|
|
|
|
shortcut = "x";
|
|
|
|
terminal = "screen-256";
|
|
|
|
baseIndex = 1;
|
|
|
|
};
|
2020-05-23 15:43:54 +02:00
|
|
|
|
|
|
|
# Automount external storage
|
2020-10-21 23:13:58 +02:00
|
|
|
systemd.mounts = [
|
|
|
|
# USB
|
|
|
|
{
|
2021-12-13 22:52:09 +01:00
|
|
|
what = "/dev/sda1";
|
2020-10-21 23:13:58 +02:00
|
|
|
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" ];
|
|
|
|
}
|
|
|
|
];
|
2020-05-28 03:02:44 +02:00
|
|
|
|
2020-07-17 11:25:43 +02:00
|
|
|
# Integrate pass with the browser
|
|
|
|
programs.browserpass.enable = true;
|
|
|
|
|
2020-11-14 16:11:00 +01:00
|
|
|
# Enable WebRTC screensharing
|
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
2020-12-28 16:07:33 +01:00
|
|
|
extraPortals = with pkgs; [ xdg-desktop-portal-wlr ];
|
2020-11-14 16:11:00 +01:00
|
|
|
};
|
2020-04-22 22:13:03 +02:00
|
|
|
}
|