nixos/system/hyprland.nix

85 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
webcord
teams-for-linux
];
};
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 = ["nyxt.desktop" "chromium-browser.desktop"];
applications = {
"image/jpeg" = ["swayimg.desktop"] ++ emacs;
"image/png" = ["swayimg.desktop"] ++ emacs;
"video/mp4" = ["mpv.desktop"];
"text/csv" = emacs;
"text/html" = browser;
"application/pdf" = emacs;
"application/epub+zip" = emacs;
"application/oxps" = emacs;
"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;
"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/ms-word" = emacs;
"x-scheme-handler/ms-powerpoint" = emacs;
"x-scheme-handler/ms-excel" = emacs;
"x-scheme-handler/unknown" = emacs;
};
in {
enable = true;
defaultApplications = applications;
addedAssociations = applications;
};
programs = {
dconf.enable = true;
light.enable = true;
hyprland = {
enable = true;
xwayland.enable = true;
};
};
}