pumpkin: lanzaboote: enable SecureBoot
[julm/julm-nix.git] / home-manager / profiles / graphical.nix
index 1500190ff6886a32dddb15fe0b522244f22fdef6..046118b562a522fc3665441ea324e4b5156b4de4 100644 (file)
@@ -1,14 +1,19 @@
-{ pkgs, lib, config, nixosConfig, ... }:
+{
+  pkgs,
+  lib,
+  config,
+  nixosConfig,
+  ...
+}:
 {
   imports = [
     ./redshift.nix
   ];
-  gtk.enable = true;
   home.packages = [
     pkgs.arandr
     pkgs.glib.bin
     pkgs.glxinfo
-    pkgs.gnome.dconf-editor
+    pkgs.dconf-editor
     pkgs.hicolor-icon-theme
     pkgs.pavucontrol
     pkgs.qpwgraph
   home.sessionVariables = lib.mkIf (!nixosConfig.services.gnome.at-spi2-core.enable) {
     NO_AT_BRIDGE = "1";
   };
-  services.redshift.enable = lib.mkDefault true;
+  # keycode <num> = <x> <Shift+x> _ _ <AltGr+x> <AltGr+Shift+x> _ _"
   home.file.".Xmodmap".text = ''
-    ! œ and Œ with AltGr+o and AltGr+Shift+o
-    keycode  32 = o O o O oe OE
+    ! — (tiret insécable) with AltGr+Shift+-
+    keycode 15 = minus                6            bar       fiveeighths bar         U2011
+    ! — (tiret cadratin) with AltGr+Shift+_
+    keycode 17 = underscore           8            bar       fiveeighths backslash   emdash
+    ! œ with AltGr+o
+    ! Œ with AltGr+Shift+o
+    keycode 32 = o                    O            o         O           oe          OE
+    ! … (ellipsis) with AltGr+;
+    keycode 59 = semicolon period comma less ellipsis multiply ccedilla Ccedilla
+    !   (nbsp) with AltGr+space and   (narrow nbsp) with AltGr+Shift+space
+    keycode 65 = space space NoSymbol NoSymbol nobreakspace U202F
+
+    ! Use Caps Lock button for compose key
+    keysym Caps_Lock = Multi_key Caps_Lock
+    ! Remove shift lock functionality
+    clear Lock
   '';
   systemd.user.services.setxkbmap.Service.ExecStartPost =
     "${pkgs.xorg.xmodmap}/bin/xmodmap ${config.home.homeDirectory}/.Xmodmap";
+  programs.bash = {
+    initExtra = ''
+      gtk-theme () {
+        case $1 in
+          dark)
+            dconf write /org/gnome/desktop/interface/color-scheme "'prefer-dark'"
+            echo 'Net/ThemeName "Adwaita-dark"' > ~/.xsettingsd
+            systemctl --user kill -s HUP xsettingsd.service
+            ;;
+          light)
+            dconf write /org/gnome/desktop/interface/color-scheme "'prefer-light'"
+            echo 'Net/ThemeName "Adwaita"' > ~/.xsettingsd
+            systemctl --user kill -s HUP xsettingsd.service
+            ;;
+          *) echo "Usage: dark-mode <dark|light>";;
+        esac
+      }
+    '';
+  };
+  # Required for gtk-theme to work.
+  services.xsettingsd.enable = true;
+  dconf.settings = {
+    "org/gnome/desktop/interface" = {
+      color-scheme = lib.mkDefault "prefer-dark";
+    };
+  };
+  gtk = {
+    enable = lib.mkDefault true;
+    theme.name = "Adwaita";
+    theme.package = pkgs.gnome-themes-extra;
+    iconTheme.package = pkgs.adwaita-icon-theme;
+    iconTheme.name = "Adwaita";
+    gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
+    gtk3 = {
+      bookmarks = lib.mkDefault [
+      ];
+    };
+  };
 }