]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/graphical.nix
fcitx5: enable chinese
[julm/julm-nix.git] / home-manager / profiles / graphical.nix
1 {
2 pkgs,
3 lib,
4 config,
5 nixosConfig,
6 ...
7 }:
8 {
9 imports = [
10 ./redshift.nix
11 ];
12 home.packages = [
13 pkgs.arandr
14 pkgs.glib.bin
15 pkgs.glxinfo
16 pkgs.dconf-editor
17 pkgs.hicolor-icon-theme
18 pkgs.pavucontrol
19 pkgs.qpwgraph
20 pkgs.x2goclient
21 pkgs.xclip
22 pkgs.xorg.xkill
23 ];
24 #services.gnome.at-spi2-core.enable = true;
25 home.sessionVariables = lib.mkIf (!nixosConfig.services.gnome.at-spi2-core.enable) {
26 NO_AT_BRIDGE = "1";
27 };
28 # keycode <num> = <x> <Shift+x> _ _ <AltGr+x> <AltGr+Shift+x> _ _"
29 home.file.".Xmodmap".text = ''
30 ! — (tiret insécable) with AltGr+Shift+-
31 keycode 15 = minus 6 bar fiveeighths bar U2011
32 ! — (tiret cadratin) with AltGr+Shift+_
33 keycode 17 = underscore 8 bar fiveeighths backslash emdash
34 ! œ with AltGr+o
35 ! Œ with AltGr+Shift+o
36 keycode 32 = o O o O oe OE
37 ! … (ellipsis) with AltGr+;
38 keycode 59 = semicolon period comma less ellipsis multiply ccedilla Ccedilla
39 !   (nbsp) with AltGr+space and   (narrow nbsp) with AltGr+Shift+space
40 keycode 65 = space space NoSymbol NoSymbol nobreakspace U202F
41 '';
42 systemd.user.services.setxkbmap.Service.ExecStartPost =
43 "${pkgs.xorg.xmodmap}/bin/xmodmap ${config.home.homeDirectory}/.Xmodmap";
44 programs.bash = {
45 initExtra = ''
46 gtk-theme () {
47 case $1 in
48 dark)
49 dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
50 echo 'Net/ThemeName "Adwaita-dark"' > ~/.xsettingsd
51 systemctl --user kill -s HUP xsettingsd.service
52 ;;
53 light)
54 dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
55 echo 'Net/ThemeName "Adwaita"' > ~/.xsettingsd
56 systemctl --user kill -s HUP xsettingsd.service
57 ;;
58 *) echo "Usage: dark-mode <dark|light>";;
59 esac
60 }
61 '';
62 };
63 # Required for gtk-theme to work.
64 services.xsettingsd.enable = true;
65 dconf.settings = {
66 "org/gnome/desktop/interface" = {
67 color-scheme = lib.mkDefault "prefer-dark";
68 };
69 };
70 gtk = {
71 enable = lib.mkDefault true;
72 theme.name = "Adwaita";
73 theme.package = pkgs.gnome-themes-extra;
74 iconTheme.package = pkgs.adwaita-icon-theme;
75 iconTheme.name = "Adwaita";
76 gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
77 gtk3 = {
78 bookmarks = lib.mkDefault [
79 ];
80 };
81 };
82 }