nixos-config/common-gui.nix

130 lines
3.2 KiB
Nix
Raw Normal View History

2020-07-14 16:47:09 +02:00
{ config, pkgs, ... }:
{
imports = [
2021-07-14 14:04:43 +02:00
./pipewire.nix
2020-07-14 16:47:09 +02:00
];
i18n.inputMethod = {
enabled = "fcitx";
fcitx.engines = with pkgs.fcitx-engines; [ mozc anthy table-other m17n ];
};
fonts = {
enableDefaultFonts = false;
2020-08-22 16:11:23 +02:00
fontconfig = {
allowBitmaps = false;
};
2020-07-14 16:47:09 +02:00
fonts = with pkgs; [
2021-05-27 12:15:19 +02:00
# xorg.fontbhlucidatypewriter100dpi
# xorg.fontbhlucidatypewriter75dpi
2020-07-14 16:47:09 +02:00
freefont_ttf
gyre-fonts # TrueType substitutes for standard PostScript fonts
2021-05-27 12:15:19 +02:00
# xorg.fontbh100dpi
2020-07-14 16:47:09 +02:00
xorg.fontmiscmisc
xorg.fontcursormisc
2020-08-22 16:11:23 +02:00
unifont
2020-07-14 16:47:09 +02:00
noto-fonts-emoji
noto-fonts-cjk
cantarell_fonts # from gnome3 module
2020-07-15 11:48:32 +02:00
2020-08-22 16:11:23 +02:00
merriweather
merriweather-sans
open-sans
# libertine # breaks 
dejavu_fonts
2020-08-17 20:50:24 +02:00
liberation_ttf
ubuntu_font_family
wqy_microhei
ipafont
ipaexfont
source-han-serif
source-han-sans
inconsolata
iosevka
fira fira-mono fira-code
source-code-pro
2020-07-15 11:48:32 +02:00
font-awesome_5
2020-07-14 16:47:09 +02:00
];
};
2021-02-19 11:18:43 +01:00
environment.systemPackages = with pkgs; [
(writeScriptBin "gsd-xsettings"
2020-11-26 17:58:22 +01:00
''
#!/bin/sh
2021-02-19 11:18:43 +01:00
exec ${gnome3.gnome-settings-daemon}/libexec/gsd-xsettings "$@"
2020-11-26 17:58:22 +01:00
'')
2021-02-19 11:18:43 +01:00
libinput
libnotify
2020-11-26 17:58:22 +01:00
];
2020-07-14 16:47:09 +02:00
# prevent satanic torture
programs.qt5ct.enable = true;
hardware.uinput.enable = true;
users.extraUsers.gebner.extraGroups = [ "input" "tty" "audio" "video" "uinput" ];
2022-01-30 15:22:26 +01:00
services.dbus.packages = with pkgs; [ gcr ];
2020-07-14 16:47:09 +02:00
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;
2022-01-30 15:22:26 +01:00
services.gnome.at-spi2-core.enable = true;
services.gnome.gnome-keyring.enable = true;
2020-07-14 16:47:09 +02:00
services.gvfs.enable = true;
programs.seahorse.enable = true;
2022-01-30 15:22:26 +01:00
services.gnome.sushi.enable = true;
services.gnome.gnome-settings-daemon.enable = true;
2020-07-14 16:47:09 +02:00
services.telepathy.enable = true;
networking.networkmanager.enable = true;
services.upower.enable = config.powerManagement.enable;
programs.dconf.enable = true;
2021-12-12 13:21:46 +01:00
services.gnome.glib-networking.enable = true;
2020-07-14 16:47:09 +02:00
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Needed for themes and backgrounds
environment.pathsToLink = [ "/share" ];
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
services.blueman.enable = true;
programs.gnupg = {
agent.enable = true;
agent.pinentryFlavor = "gnome3";
};
2020-09-18 17:47:54 +02:00
# https://github.com/NixOS/nixpkgs/pull/54083
environment.extraSetup = ''
if [ -d $out/share/gsettings-schemas/ ]; then
# Create the standard schemas directory
mkdir -p $out/share/glib-2.0/schemas
# symlink any schema files to the standard schema directory
for d in $out/share/gsettings-schemas/*; do
# Force symlink, in case there are duplicates
ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas
done
# and compile them
if [ -w $out/share/glib-2.0/schemas ]; then
${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
fi
fi
'';
2020-07-14 16:47:09 +02:00
}