nixos/system/hyprland.nix

124 lines
3.5 KiB
Nix
Raw Normal View History

2024-01-30 14:21:50 +00:00
{pkgs, ...}: {
imports = [./desktop.nix ./chromium.nix];
2024-01-30 14:21:50 +00:00
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
2024-01-14 11:18:48 +00:00
streamlink
webcord
2024-02-02 06:43:10 +00:00
teams-for-linux
];
};
2024-01-30 14:21:50 +00:00
security.pam.services.swaylock = {};
services = {
blueman.enable = true;
udisks2.enable = true;
xserver.enable = false;
2024-01-30 14:21:50 +00:00
greetd.settings = let
command = "Hyprland";
in {
2024-01-30 14:21:50 +00:00
default_session = {inherit command;};
initial_session = {inherit command;};
};
};
xdg.mime = let
emacs = ["emacsclient.desktop" "emacs.desktop"];
# TODO add nyxt back to browser when I can fix opening
# links in existing sessions
browser = ["chromium-browser.desktop"]; # nyxt.desktop
applications = {
"inode/directory" = emacs;
2024-02-05 07:24:33 +00:00
"inode/symlink" = emacs;
"image/jpeg" = ["swayimg.desktop"] ++ emacs;
"image/png" = ["swayimg.desktop"] ++ emacs;
2024-01-30 14:21:50 +00:00
"video/mp4" = ["mpv.desktop"];
2024-02-05 07:24:33 +00:00
"text/plain" = emacs;
"text/richtext" = emacs;
"text/org" = emacs;
"text/markdown" = emacs;
"text/rust" = emacs;
"text/csv" = emacs;
2024-02-05 07:24:33 +00:00
"text/html" = emacs;
"text/css" = emacs;
"text/tab-separated-values" = emacs;
"text/x-emacs-lisp" = emacs;
"text/x-fortran" = emacs;
"text/x-idl" = emacs;
"text/x-log" = emacs;
"text/x-lua" = emacs;
"text/x-makefile" = emacs;
"text/x-python" = emacs;
"text/x-python3" = emacs;
"text/x-readme" = emacs;
"text/x-scheme" = emacs;
"text/x-tex" = emacs;
"text/x-texinfo" = emacs;
2024-02-02 06:43:10 +00:00
2024-02-05 07:24:33 +00:00
"application/json" = emacs;
"application/toml" = emacs;
"application/yaml" = emacs;
"application/xml" = emacs;
2024-02-02 06:43:10 +00:00
"application/pdf" = emacs;
"application/epub+zip" = emacs;
2024-02-05 07:24:33 +00:00
"application/rss+xml" = emacs;
2024-02-02 06:43:10 +00:00
"application/oxps" = emacs;
2024-02-05 07:24:33 +00:00
"application/msword" = emacs;
"application/xhtml+xml" = browser;
"application/x-shellscript" = emacs;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"application/x-mozilla-bookmarks" = browser;
2024-02-02 06:43:10 +00:00
"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;
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"];
};
in {
enable = true;
defaultApplications = applications;
addedAssociations = applications;
removedAssociations = {
"x-scheme-handler/msteams" = browser;
"x-scheme-handler/zoomus" = browser;
};
};
2023-08-03 16:01:13 +01:00
programs = {
dconf.enable = true;
light.enable = true;
hyprland = {
enable = true;
2023-09-11 23:04:29 +01:00
xwayland.enable = true;
};
2023-08-03 16:01:13 +01:00
};
}