nixos-config/home/m3tam3re/m3-ares.nix
2024-12-06 07:16:50 +01:00

98 lines
2.6 KiB
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.features.desktop.hyprland;
in {
imports = [
../common
./dotfiles
./home.nix
../features/cli
../features/coding
../features/desktop
#./services/librechat.nix
];
options.features.desktop.hyprland.enable =
mkEnableOption "enable Hyprland";
config = mkMerge [
# Base configuration
{
xdg = {
# TODO: better structure
enable = true;
configFile."mimeapps.list".force = true;
mimeApps = {
enable = true;
associations.added = {
"application/zip" = ["org.gnome.FileRoller.desktop"];
"application/csv" = ["calc.desktop"];
"application/pdf" = ["okularApplication_pdf.desktop"];
"x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"];
"x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"];
};
defaultApplications = {
"application/zip" = ["org.gnome.FileRoller.desktop"];
"application/csv" = ["calc.desktop"];
"application/pdf" = ["okularApplication_pdf.desktop"];
"application/md" = ["nvim.desktop"];
"application/text" = ["nvim.desktop"];
"x-scheme-handler/http" = ["io.github.zen_browser.zen.desktop"];
"x-scheme-handler/https" = ["io.github.zen_browser.zen.desktop"];
};
};
};
features = {
cli = {
fish.enable = true;
fzf.enable = true;
neofetch.enable = true;
secrets.enable = true;
starship.enable = true;
};
desktop = {
gaming.enable = true;
hyprland.enable = true;
media.enable = true;
office.enable = true;
rofi.enable = true;
fonts.enable = true;
wayland.enable = true;
};
};
}
(mkIf cfg.enable {
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor = [
"DP-1,2560x1440@144,0x0,1"
"DP-2,2560x1440@144,2560x0,1"
];
workspace = [
"1, monitor:DP-1, default:true"
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:DP-2"
"5, monitor:DP-1"
"6, monitor:DP-2"
"7, monitor:DP-2"
];
windowrulev2 = [
"workspace 1,class:dev.zed.Zed"
"workspace 2,class:(com.obsproject.Studio)"
"workspace 4,opacity 1.0, class:(chromium-browser)"
"workspace 4,opacity 1.0, class:(zen-alpha)"
];
};
};
})
];
}