nixos/system/hyprland.nix
Evie Litherland-Smith 1d4b2e9366 Replace nyxt with qutebrowser as default for better performance
Keep nyxt around, will switch back when blink support is added (in
progress at the moment)

Update mime entries so qutebrowser is the default browser, also
rewrote slightly so avoid the massive repetition in there previously
2024-02-01 07:24:18 +00:00

80 lines
2.3 KiB
Nix

{pkgs, ...}: {
imports = [./desktop.nix ./chromium.nix];
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
XDG_CURRENT_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
};
systemPackages = with pkgs; [
xdg-utils
wtype
wl-clipboard
swayimg
pamixer
pavucontrol
playerctl
brightnessctl
protonvpn-gui
mpv
streamlink
libreoffice
webcord
];
};
security.pam.services.swaylock = {};
services = {
blueman.enable = true;
udisks2.enable = true;
xserver.enable = false;
greetd.settings = let
command = "Hyprland";
in {
default_session = {inherit command;};
initial_session = {inherit command;};
};
};
xdg.mime = let
emacs = ["emacsclient.desktop" "emacs.desktop"];
browser = ["org.qutebrowser.qutebrowser.desktop" "nyxt.desktop" "chromium-browser.desktop" "firefox.desktop"];
applications = {
"application/pdf" = emacs;
"application/epub+zip" = emacs;
"application/oxps" = emacs;
"image/jpeg" = ["swayimg.desktop"] ++ emacs;
"image/png" = ["swayimg.desktop"] ++ emacs;
"video/mp4" = ["mpv.desktop"];
"text/csv" = emacs;
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = browser;
"x-scheme-handler/webcal" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"application/x-mozilla-bookmarks" = browser;
};
in {
enable = true;
defaultApplications = applications;
addedAssociations = applications;
};
programs = {
dconf.enable = true;
light.enable = true;
hyprland = {
enable = true;
xwayland.enable = true;
};
};
}