dotfiles/modules/home/graphical/default.nix
eriedaberrie e1fbf03dff Initial commit
Note: not the actual initial commit.

I swear I will stop repeatedly force pushing to this single commit eventually
ok.
2024-09-08 09:58:54 -07:00

89 lines
2.1 KiB
Nix

{ pkgs, config, lib, osConfig, ... }:
let
cfg = config.my.graphical;
in {
imports = [
./wayland
./dunst.nix
./emacs.nix
./firefox.nix
./keepassxc.nix
./kitty.nix
./mangohud.nix
./mpv.nix
./obs.nix
./qtk.nix
./qutebrowser.nix
./zathura.nix
];
options.my.graphical = {
enable = lib.mkEnableOption null;
};
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = true;
xdg = {
userDirs = {
enable = true;
createDirectories = true;
};
mimeApps = {
enable = true;
defaultApplications = let
editor = "emacsclient.desktop";
email = "emacsclient-mail.desktop";
pdf = "org.pwmt.zathura.desktop";
browser = "firefox.desktop";
image = "imv.desktop";
video = "mpv.desktop";
explorer = "thunar.desktop";
in {
"application/octet-stream" = editor;
"text/plain" = editor;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/mailto" = email;
"application/pdf" = pdf;
"image/bmp" = image;
"image/jpeg" = image;
"image/gif" = image;
"image/png" = image;
"image/svg+xml" = image;
"image/webp" = image;
"inode/directory" = explorer;
"video/mp4" = video;
"video/mpeg" = video;
};
};
};
services = let
bluetooth = osConfig.my.desktop.bluetooth.enable;
networkManager = osConfig.my.networking.networkManager.enable;
in {
mpris-proxy.enable = bluetooth;
blueman-applet.enable = bluetooth;
network-manager-applet.enable = networkManager;
};
home = let
cursorSize = 36;
in {
pointerCursor = {
package = pkgs.catppuccin-cursors.mochaDark;
name = "catppuccin-mocha-dark-cursors";
size = cursorSize;
gtk.enable = true;
};
sessionVariables = lib.mkIf config.my.graphical.wayland.hyprland.enable {
HYPRCURSOR_THEME = "catppuccin-mocha-dark";
HYPRCURSOR_SIZE = cursorSize;
};
};
};
}