nix/module/Sway.nix

62 lines
1.4 KiB
Nix
Raw Normal View History

2024-03-28 04:27:37 +03:00
{ pkgs, lib, ... }: {
# GUI.
services.xserver.enable = true;
services.xserver.xkb = {
layout = "us,ru";
options = "grp:caps_toggle,lv3:ralt_switch";
};
# Specify default apps.
xdg.mime.defaultApplications = {
# Use `file -i file.txt` to find file mime type.
# Use `xdg-mime query default "text/plain"` to find default app.
"application/pdf" = "org.gnome.Evince.desktop"; # TODO: Different apps?
2024-03-28 04:27:37 +03:00
"application/vnd.openxmlformats-officedocument.*" = "onlyoffice-desktopeditors.desktop";
"audio/*" = "mpv.desktop";
"image/*" = "org.gnome.Loupe.desktop";
"text/*" = "nvim.desktop";
"video/*" = "mpv.desktop";
};
# Extra apps.
services.gnome.gnome-keyring.enable = lib.mkForce false;
environment.systemPackages = with pkgs; [
grim # Screenshot.
mako # Notification system.
slurp # Screenshot.
wl-clipboard # Clipboard.
2024-03-28 04:27:37 +03:00
];
# Sound.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Sway.
programs.sway = {
enable = true;
wrapperFeatures = {
base = true;
gtk = true;
};
extraOptions = [
"--config=${./sway/Config}"
];
};
# Brightness control.
programs.light.enable = true;
# Configs.
2024-03-28 04:27:37 +03:00
environment.variables = {
2024-03-28 05:55:16 +03:00
FOOT_CONFIG = ./foot/Foot.ini;
SWAY_CONFIG = ./sway/module;
2024-03-28 04:27:37 +03:00
};
}