nixos/home/hyprland/default.nix

162 lines
4.8 KiB
Nix
Raw Normal View History

2023-12-04 06:42:34 +00:00
{ config, lib, pkgs, ... }: {
imports = [ ./waybar/default.nix ];
services = {
avizo.enable = true;
2023-11-09 11:54:55 +00:00
syncthing.enable = true;
udiskie = {
enable = true;
notify = true;
automount = true;
2023-11-09 11:54:55 +00:00
tray = "never";
};
mako = {
enable = true;
actions = true;
anchor = "top-right";
defaultTimeout = 5000;
icons = true;
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
layer = "overlay";
margin = "20";
padding = "10";
sort = "-time";
borderRadius = 10;
};
};
wayland.windowManager.hyprland = {
enable = true;
2023-09-11 23:04:29 +01:00
xwayland.enable = true;
2023-10-16 13:19:38 +01:00
systemd.enable = true;
extraConfig = import ./config.nix { inherit config pkgs; };
};
programs = {
zathura.enable = true;
foot = {
enable = true;
settings = {
main = {
pad = "10x10";
locked-title = false;
notify-focus-inhibit = true;
selection-target = "both";
};
bell = {
urgent = true;
notify = true;
};
mouse = { hide-when-typing = "yes"; };
};
};
rofi = {
enable = true;
package = pkgs.rofi-wayland;
location = "center";
terminal = "foot";
pass = {
enable = true;
package = pkgs.rofi-pass-wayland;
extraConfig = ''
USERNAME_field='login'
'';
};
plugins = with pkgs; [ rofi-calc ];
extraConfig = let
power-menu = "power-menu:${pkgs.rofi-power-menu}/bin/rofi-power-menu";
in {
modi = "window,run,drun,ssh,calc,${power-menu},combi";
combi-modi = "window,drun,ssh,calc";
sidebar-mode = true;
sort = true;
sorting-method = "fzf";
matching = "fuzzy";
icon-theme = config.gtk.iconTheme.name;
show-icons = true;
application-fallback-icon = "󰋙";
drun-display-format = "{icon} {name} ({categories})";
disable-history = false;
hide-scrollbar = true;
display-window = " 󰧨 Move ";
display-run = " 󰅴 Run ";
display-drun = " 󱓞 Launch ";
display-ssh = " 󰢹 SSH ";
display-calc = " 󰪚 Calculator ";
display-combi = " 󰛡 Combi ";
};
};
};
gtk = {
enable = true;
cursorTheme = {
package = pkgs.catppuccin-cursors.mochaDark;
name = "Catppuccin-Mocha-Dark-Cursors";
size = 24;
};
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
theme = {
package = pkgs.catppuccin-gtk.override {
accents = [ "lavender" ];
size = "standard";
variant = "mocha";
};
name = "Catppuccin-Mocha-Standard-Lavender-Dark";
};
};
2023-09-13 17:43:20 +01:00
xdg = {
configFile = {
"hypr/extra.conf" = lib.mkDefault { text = ""; };
2023-09-13 17:43:20 +01:00
"hypr/hyprpaper.conf".text = ''
preload = ${config.stylix.image}
wallpaper = ,${config.stylix.image}
2023-09-13 17:43:20 +01:00
'';
"gtklock/config.ini".text = let
powerbar =
"${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so";
playerctl =
"${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so";
in ''
[main]
start-hidden=true
modules=${powerbar};${playerctl}
[powerbar]
reboot-command=systemctl reboot
poweroff-command=systemctl -i poweroff
suspend-command=systemctl suspend
logout-command=hyprctl dispatch exit
[playerctl]
art-size=64
position=below-clock
'';
2023-09-13 17:43:20 +01:00
};
mimeApps = rec {
enable = true;
defaultApplications = {
2023-09-13 17:43:20 +01:00
"image/jpeg" = [ "swayimg.desktop" ];
"image/png" = [ "swayimg.desktop" ];
2023-09-14 05:57:45 +01:00
"video/mp4" = [ "mpv.desktop" ];
2023-10-11 16:09:34 +01:00
"text/csv" = [ "calc.desktop" ];
"text/html" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/chrome" = [ "firefox.desktop" ];
"application/x-extension-htm" = [ "firefox.desktop" ];
"application/x-extension-html" = [ "firefox.desktop" ];
"application/x-extension-shtml" = [ "firefox.desktop" ];
"application/xhtml+xml" = [ "firefox.desktop" ];
"application/x-extension-xhtml" = [ "firefox.desktop" ];
"application/x-extension-xht" = [ "firefox.desktop" ];
2023-12-21 13:26:10 +00:00
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
"application/epub+zip" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
"application/oxps" = [ "org.pwmt.zathura-pdf-mupdf.desktop" ];
2024-01-03 14:24:43 +00:00
"x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ];
2023-09-13 17:43:20 +01:00
};
associations.added = defaultApplications;
2023-09-13 17:43:20 +01:00
};
};
}