diff --git a/modules/nixos/graphical/default.nix b/modules/nixos/graphical/default.nix index 4e2173e..67f2cf3 100644 --- a/modules/nixos/graphical/default.nix +++ b/modules/nixos/graphical/default.nix @@ -1,7 +1,14 @@ { lib, ... }: { - imports = - [ ./xorg.nix ./fonts.nix ./i3.nix ./polybar.nix ./picom.nix ./rofi.nix ]; + imports = [ + ./dunst.nix + ./fonts.nix + ./i3.nix + ./picom.nix + ./polybar.nix + ./rofi.nix + ./xorg.nix + ]; options = { diff --git a/modules/nixos/graphical/dunst.nix b/modules/nixos/graphical/dunst.nix new file mode 100644 index 0000000..fa79e2e --- /dev/null +++ b/modules/nixos/graphical/dunst.nix @@ -0,0 +1,31 @@ +{ config, ... }: + +{ + + config = { + + home-manager.users.${config.user}.services.dunst = { + enable = true; + settings = { + global = { + width = 300; + height = 200; + offset = "30x50"; + origin = "top-right"; + transparency = 0; + padding = 20; + horizontal_padding = 20; + frame_color = config.theme.colors.base03; + }; + + urgency_normal = { + background = config.theme.colors.base00; + foreground = config.theme.colors.base05; + timeout = 10; + }; + }; + }; + + }; + +} diff --git a/modules/nixos/graphical/fonts.nix b/modules/nixos/graphical/fonts.nix index 9fb8191..c081450 100644 --- a/modules/nixos/graphical/fonts.nix +++ b/modules/nixos/graphical/fonts.nix @@ -22,6 +22,7 @@ in { programs.rofi.font = "Hack Nerd Font 14"; programs.alacritty.settings.font.normal.family = fontName; programs.kitty.font.name = fontName; + services.dunst.settings.global.font = "Hack Nerd Font 14"; }; }; diff --git a/modules/nixos/graphical/i3.nix b/modules/nixos/graphical/i3.nix index 53edb05..9956adf 100644 --- a/modules/nixos/graphical/i3.nix +++ b/modules/nixos/graphical/i3.nix @@ -128,6 +128,10 @@ in { "${modifier}+Shift+q" = '' exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"''; "${modifier}+Shift+x" = "exec ${lockCmd}"; + "${modifier}+Mod1+h" = + "exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt home.\" || read'"; + "${modifier}+Mod1+r" = + "exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt NixOS.\" || read'"; # Window options "${modifier}+q" = "kill";