2022-04-20 17:05:02 +00:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.linux.graphical;
|
2023-03-08 20:23:19 +00:00
|
|
|
|
|
|
|
birdtray = pkgs.birdtray.overrideAttrs (attrs: {
|
|
|
|
cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${pkgs.thunderbird}/bin/thunderbird" ];
|
|
|
|
});
|
2022-04-20 17:05:02 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [ ./x11.nix ./wayland.nix ./alacritty.nix ];
|
|
|
|
options.linux.graphical = {
|
|
|
|
type = mkOption {
|
|
|
|
type = types.nullOr (types.enum [ "x11" "wayland" ]);
|
|
|
|
description = "Enable linux graphical configurations, with either 'x11' or 'wayland'";
|
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
wallpaper = mkOption {
|
|
|
|
type = types.oneOf [ types.str types.path ];
|
|
|
|
description = "Path to the wallpaper file";
|
|
|
|
default = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf (cfg.type != null) {
|
|
|
|
# Packages
|
|
|
|
|
|
|
|
home.packages = (with pkgs; [
|
|
|
|
## GUI stuff
|
|
|
|
gnome.cheese # Webcam check
|
|
|
|
evince # PDF reader
|
|
|
|
gparted
|
|
|
|
pkgs.unstable.vscode
|
|
|
|
feh
|
|
|
|
deluge # Torrent client
|
|
|
|
pavucontrol # PulseAudio control panel
|
2023-03-08 20:23:19 +00:00
|
|
|
firefox
|
|
|
|
|
2022-11-14 14:25:54 +00:00
|
|
|
thunderbird
|
2023-03-08 20:23:19 +00:00
|
|
|
birdtray
|
|
|
|
|
2023-02-27 15:10:45 +00:00
|
|
|
zotero
|
2022-04-20 17:05:02 +00:00
|
|
|
|
|
|
|
## CLI stuff
|
|
|
|
dex # .desktop file management, startup
|
2022-12-05 09:59:59 +00:00
|
|
|
# sct # Display color temperature
|
2022-05-31 16:39:14 +00:00
|
|
|
xdg-utils # Open stuff
|
2022-10-17 08:24:54 +00:00
|
|
|
] ++ (if pkgs.stdenv.isAarch64 then [ ] else [
|
|
|
|
mailspring
|
2022-10-17 12:10:58 +00:00
|
|
|
unstable.slack
|
2022-10-17 08:24:54 +00:00
|
|
|
]));
|
2022-04-20 17:05:02 +00:00
|
|
|
|
2022-11-08 17:59:53 +00:00
|
|
|
nki.programs.discord.enable = pkgs.stdenv.isx86_64;
|
|
|
|
|
2022-04-20 17:05:02 +00:00
|
|
|
# Cursor
|
2022-05-28 16:35:20 +00:00
|
|
|
home.pointerCursor = {
|
2022-04-20 17:05:02 +00:00
|
|
|
package = pkgs.numix-cursor-theme;
|
2022-05-04 14:23:09 +00:00
|
|
|
name = "Numix-Cursor";
|
|
|
|
size = 24;
|
2022-04-20 17:05:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# MIME set ups
|
|
|
|
xdg.enable = true;
|
|
|
|
xdg.mimeApps.enable = true;
|
2023-03-08 20:23:19 +00:00
|
|
|
|
|
|
|
xdg.mimeApps.associations.added = {
|
|
|
|
"x-scheme-handler/mailto" = [ "userapp-Thunderbird-HPUL11.desktop" ];
|
|
|
|
"x-scheme-handler/mid" = [ "userapp-Thunderbird-HPUL11.desktop" ];
|
|
|
|
};
|
2022-04-20 17:05:02 +00:00
|
|
|
xdg.mimeApps.defaultApplications = {
|
|
|
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
|
|
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
|
|
|
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
|
|
|
"x-scheme-handler/ftps" = [ "firefox.desktop" ];
|
2023-03-08 20:23:19 +00:00
|
|
|
"x-scheme-handler/mailto" = [ "userapp-Thunderbird-HPUL11.desktop" ];
|
|
|
|
"message/rfc822" = [ "userapp-Thunderbird-HPUL11.desktop" ];
|
|
|
|
"x-scheme-handler/mid" = [ "userapp-Thunderbird-HPUL11.desktop" ];
|
2022-04-20 17:05:02 +00:00
|
|
|
};
|
|
|
|
|
2023-03-08 23:24:50 +00:00
|
|
|
# Theming
|
|
|
|
## GTK
|
|
|
|
gtk.enable = true;
|
|
|
|
gtk.cursorTheme = { inherit (config.home.pointerCursor) package name size; };
|
|
|
|
gtk.font.name = "Noto Sans";
|
|
|
|
gtk.font.size = 10;
|
|
|
|
gtk.iconTheme = {
|
|
|
|
package = pkgs.numix-icon-theme;
|
|
|
|
name = "Numix";
|
|
|
|
};
|
|
|
|
gtk.theme = {
|
|
|
|
package = pkgs.numix-gtk-theme;
|
|
|
|
name = "Numix";
|
|
|
|
};
|
|
|
|
## Qt
|
|
|
|
qt.enable = true;
|
|
|
|
qt.platformTheme = "gnome";
|
|
|
|
qt.style.package = pkgs.adwaita-qt;
|
|
|
|
qt.style.name = "adwaita";
|
|
|
|
|
2022-04-20 17:05:02 +00:00
|
|
|
home.sessionVariables = {
|
|
|
|
# Set up Java font style
|
|
|
|
_JAVA_OPTIONS = "-Dawt.useSystemAAFontSettings=lcd";
|
|
|
|
};
|
|
|
|
# IBus configuration
|
2023-01-25 14:43:11 +00:00
|
|
|
# dconf.settings."desktop/ibus/general" = {
|
|
|
|
# engines-order = hm.gvariant.mkArray hm.gvariant.type.string [ "xkb:jp::jpn" "mozc-jp" "Bamboo" ];
|
|
|
|
# reload-engines = hm.gvariant.mkArray hm.gvariant.type.string [ "xkb:jp::jpn" "mozc-jp" "Bamboo" ];
|
|
|
|
# };
|
|
|
|
# dconf.settings."desktop/ibus/general/hotkey" = {
|
|
|
|
# triggers = hm.gvariant.mkArray hm.gvariant.type.string [ "<Super>z" ];
|
|
|
|
# };
|
2022-04-20 17:05:02 +00:00
|
|
|
};
|
|
|
|
}
|
2023-03-08 20:23:19 +00:00
|
|
|
|