Files
system-config/home-manager/features/linux-desktop.nix

119 lines
2.7 KiB
Nix

{
config,
pkgs,
...
}:
let
browser = "firefox";
in
{
imports = [
./audio.nix
./hypr/hyprland.nix
./rofi/rofi.nix
./sway.nix
../apps/element.nix
../apps/discord.nix
./terminal.nix
../options/monitors.nix
];
home = {
packages = with pkgs; [
# Desktop Applications
gimp3
vlc
# Common utilities
feh
networkmanagerapplet # network control
gnome-keyring # Secret management
glib # for Gnome/GTK settings
gsettings-desktop-schemas # So that we can access gnome settings
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk # GTK backend for XDG components like pickers
grim # Screenshot provider
nwg-look # GTK settings editor
playerctl # for universal play/pause etc
wirelesstools
waypaper # Wallpaper switcher
];
pointerCursor = {
enable = true;
gtk.enable = true;
size = 16;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
# package = pkgs.phinger-cursors;
# name = "phinger-cursors";
};
# Hint for electron apps to use wayland
sessionVariables.NIXOS_OZONE_WL = "1";
# Miscelaneous config files
file = {
".XCompose".source = ./config/XCompose;
};
};
programs = {
# browsers
firefox = {
enable = true;
configPath = "${config.xdg.configHome}/mozilla/firefox";
};
chromium.enable = true;
};
# GTK settings
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4 = {
# Don't use GTK4 themes. See https://stopthemingmy.app/
theme = null;
extraConfig = {
gtk-application-prefer-dark-theme = true;
};
};
};
# This is where the real magic happens to tell the applications to prefer
# dark mode. For example, Element reads from this setting.
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
# QT theming
qt = {
enable = true;
platformTheme.name = "adwaita";
style.name = "adwaita-dark";
};
# Default apps
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = [ "${browser}.desktop" ];
"default-web-browser" = [ "${browser}.desktop" ];
"x-scheme-handler/http" = [ "${browser}.desktop" ];
"x-scheme-handler/https" = [ "${browser}.desktop" ];
"x-scheme-handler/about" = [ "${browser}.desktop" ];
"x-scheme-handler/unknown" = [ "${browser}.desktop" ];
};
};
home.sessionVariables.DEFAULT_BROWSER = "${pkgs."${browser}"}/bin/${browser}";
}