]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/graphical.nix
xmonad: rofi: import more environment variables
[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 ! Use Caps Lock button for compose key
43 keysym Caps_Lock = Multi_key Caps_Lock
44 ! Remove shift lock functionality
45 clear Lock
46 '';
47 systemd.user.services.setxkbmap.Service.ExecStartPost =
48 "${pkgs.xorg.xmodmap}/bin/xmodmap ${config.home.homeDirectory}/.Xmodmap";
49 programs.bash = {
50 initExtra = ''
51 gtk-theme () {
52 case $1 in
53 dark)
54 dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
55 echo 'Net/ThemeName "Adwaita-dark"' > ~/.xsettingsd
56 systemctl --user kill -s HUP xsettingsd.service
57 ;;
58 light)
59 dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
60 echo 'Net/ThemeName "Adwaita"' > ~/.xsettingsd
61 systemctl --user kill -s HUP xsettingsd.service
62 ;;
63 *) echo "Usage: dark-mode <dark|light>";;
64 esac
65 }
66 '';
67 };
68 # Required for gtk-theme to work.
69 services.xsettingsd.enable = true;
70 dconf.settings = {
71 "org/gnome/desktop/interface" = {
72 color-scheme = lib.mkDefault "prefer-dark";
73 };
74 };
75 gtk = {
76 enable = lib.mkDefault true;
77 theme.name = "Adwaita";
78 theme.package = pkgs.gnome-themes-extra;
79 iconTheme.package = pkgs.adwaita-icon-theme;
80 iconTheme.name = "Adwaita";
81 gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
82 gtk3 = {
83 bookmarks = lib.mkDefault [
84 ];
85 };
86 };
87 }