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