nixos-config/i3.nix

165 lines
3.9 KiB
Nix

{ config, pkgs, ... }:
{
# programs.ibus.enable = true;
# programs.ibus.plugins = [ pkgs.ibus-anthy pkgs.mozc ];
i18n.inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
};
environment.systemPackages = with pkgs; with gnome3; [
i3
i3status
rofi
rofi-pass
pa_applet
feh
gnome_keyring
networkmanagerapplet
nautilus # in closure of gnome-terminal anyhow
pcmanfm
# colord
evince
arandr
xss-lock i3lock i3lock-color
# xdotool
scrot
pavucontrol
dconf-editor
unclutter-xfixes
# gnome3 core packages
desktop_file_utils shared_mime_info
glib gtk3
glib_networking gvfs dconf
gnome_settings_daemon
gnome_themes_standard defaultIconTheme
hicolor_icon_theme
];
fonts = {
enableDefaultFonts = false;
fonts = with pkgs; [
xorg.fontbhlucidatypewriter100dpi
xorg.fontbhlucidatypewriter75dpi
dejavu_fonts
freefont_ttf
gyre-fonts # TrueType substitutes for standard PostScript fonts
liberation_ttf
xorg.fontbh100dpi
xorg.fontmiscmisc
xorg.fontcursormisc
# unifont
wqy_microhei
inconsolata
dejavu_fonts
ipafont
ipaexfont
ubuntu_font_family
source-code-pro
fira fira-mono fira-code
noto-fonts-emoji
noto-fonts-cjk
cantarell_fonts # from gnome3 module
];
};
# prevent satanic torture
programs.qt5ct.enable = true;
services.xserver = {
enable = true;
displayManager = {
# slim.enable = true;
# slim.defaultUser = "gebner";
# # slim.autoLogin = true;
lightdm.enable = true;
# startx.enable = true;
# sddm.enable = true;
};
desktopManager = {
default = "i3wm";
xterm.enable = false;
session = [ {
name = "i3wm";
start = ''
export XDG_DATA_DIRS=/run/current-system/sw/share/''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
export $(${pkgs.gnome3.gnome_keyring}/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export XDG_CURRENT_DESKTOP=X-Generic
for m in xsettings; do
${pkgs.gnome3.gnome_settings_daemon}/libexec/gsd-$m &
done
i3 &
waitPID=$!
'';
} ];
};
updateDbusEnvironment = true;
windowManager = {
default = "none";
# i3.enable = true;
};
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "caps:ctrl_modifier";
};
services.dbus.packages = with pkgs; [ dunst gnome3.gcr ];
services.udev.packages = [ pkgs.gnome3.gnome_settings_daemon ];
# copied from gnome3 module
security.polkit.enable = true;
services.udisks2.enable = true;
services.accounts-daemon.enable = true;
services.geoclue2.enable = true;
services.gnome3.at-spi2-core.enable = true;
services.gnome3.gnome-keyring.enable = true;
services.gnome3.gvfs.enable = true;
services.gnome3.seahorse.enable = true;
services.gnome3.sushi.enable = true;
services.telepathy.enable = true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
programs.dconf.enable = true;
services.flatpak.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# Needed for themes and backgrounds
environment.pathsToLink = [ "/share" ];
environment.variables.GIO_EXTRA_MODULES = with pkgs.gnome3; [
"${pkgs.lib.getLib dconf}/lib/gio/modules"
"${glib_networking.out}/lib/gio/modules"
"${gvfs}/lib/gio/modules" ];
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
hardware.pulseaudio = {
enable = true;
zeroconf.discovery.enable = true;
daemon.config = {
flat-volumes = "no";
};
package = pkgs.pulseaudioFull;
extraModules = [ pkgs.pulseaudio-modules-bt ];
};
programs.gnupg = {
agent.enable = true;
agent.pinentryFlavor = "gnome3";
};
}