From da4c0dea556b3aa64b4439ff5e91c93d170a4f8e Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Tue, 9 Dec 2025 13:09:35 +0200 Subject: The options for required for online are incorrect --- home/default.nix | 6 +- home/dunst.nix | 122 +++++++++++++++++++++++++++++++++ home/dunst/default.nix | 122 --------------------------------- home/hyprland.nix | 169 ++++++++++++++++++++++++++++++++++++++++++++++ home/hyprland/default.nix | 169 ---------------------------------------------- hosts/kataja/default.nix | 3 - hosts/pihlaja/default.nix | 2 - 7 files changed, 294 insertions(+), 299 deletions(-) create mode 100644 home/dunst.nix delete mode 100644 home/dunst/default.nix create mode 100644 home/hyprland.nix delete mode 100644 home/hyprland/default.nix diff --git a/home/default.nix b/home/default.nix index 6c5ab3d..ed7e5ae 100644 --- a/home/default.nix +++ b/home/default.nix @@ -22,12 +22,12 @@ in ./chawan.nix ./chromium.nix ./dav - ./dunst + ./dunst.nix ./fastfetch.nix ./firefox ./fish.nix ./git.nix - ./hyprland + ./hyprland.nix ./hyprlock.nix ./mail ./mpv.nix @@ -39,6 +39,7 @@ in ./walker.nix ./wallpapers ./waybar + ./zaread.nix ]; home.file = { @@ -303,7 +304,6 @@ in enableFishIntegration = true; enableNushellIntegration = true; }; - mpd-mpris.enable = true; mpris-proxy.enable = true; mpd = { enable = true; diff --git a/home/dunst.nix b/home/dunst.nix new file mode 100644 index 0000000..7eca193 --- /dev/null +++ b/home/dunst.nix @@ -0,0 +1,122 @@ +{ pkgs, ... }: +{ + services.dunst = { + enable = true; + iconTheme = { + name = "Twitter Color Emoji"; + package = pkgs.twitter-color-emoji; + }; + + settings = { + global = { + ### Display ### + monitor = 0; + follow = "none"; + width = "(100, 500)"; + height = "(0, 300)"; + origin = "top-right"; + offset = "(5, 15)"; + scale = 0; + notification_limit = 10; + + ### Progress bar ### + progress_bar = true; + progress_bar_height = 14; + progress_bar_frame_width = 0; + progress_bar_min_width = 100; + progress_bar_max_width = 500; + progress_bar_corner_radius = 50; + progress_bar_corners = "bottom-left,top-right"; + icon_corner_radius = 0; + icon_corners = "all"; + + indicate_hidden = "yes"; + transparency = 0; + separator_height = 6; + padding = 10; + horizontal_padding = 8; + text_icon_padding = 12; + frame_width = 1; + frame_color = "#a0a0a0"; + gap_size = 6; + separator_color = "frame"; + corner_radius = 10; + corners = "bottom,top-left"; + + ### Text ### + font = "Iosevka Nerd Font"; + markup = "full"; + format = "%s\n%b"; + alignment = "left"; + vertical_alignment = "center"; + word_wrap = "yes"; + ellipsize = "middle"; + ignore_newline = "no"; + line_height = 0; + show_age_threshold = -1; + stack_duplicates = true; + hide_duplicate_count = false; + show_indicators = "yes"; + + ### Icons ### + icon_position = "right"; + min_icon_size = 32; + max_icon_size = 128; + enable_recursive_icon_lookup = true; + icon_theme = "Twitter Color Emoji"; + + ### History ### + sticky_history = "yes"; + history_length = 30; + + ### Behavior ### + sort = "yes"; + idle_threshold = 120; + always_run_script = true; + + ### Browser & Menu ### + browser = "${pkgs.firefox}/bin/firefox -new-tab"; + dmenu = "${pkgs.walker}/bin/walker --modules applications,translation,webesearch,clipboard,finder"; + + ### Misc ### + title = "Dunst"; + class = "Dunst"; + startup_notification = true; + ignore_dbusclose = false; + force_xwayland = false; + force_xinerama = false; + per_monitor_dpi = false; + + ### Mouse ### + mouse_left_click = "close_current"; + mouse_middle_click = "do_action,close_current"; + mouse_right_click = "close_all"; + }; + + urgency_low = { + background = "#222222"; + foreground = "#ffffff"; + highlight = "#722ae6,#e4b5cb"; + timeout = 20; + }; + + urgency_normal = { + background = "#222222"; + foreground = "#ffffff"; + frame_color = "#5e5086"; + highlight = "#722ae6,#e4b5cb"; + timeout = 20; + override_pause_level = 30; + }; + + urgency_critical = { + background = "#222222"; + foreground = "#ffffff"; + frame_color = "#d54e53"; + highlight = "#d54e53,#f0f0f0"; + timeout = 0; + override_pause_level = 60; + }; + }; + }; +} diff --git a/home/dunst/default.nix b/home/dunst/default.nix deleted file mode 100644 index 7eca193..0000000 --- a/home/dunst/default.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ pkgs, ... }: -{ - services.dunst = { - enable = true; - iconTheme = { - name = "Twitter Color Emoji"; - package = pkgs.twitter-color-emoji; - }; - - settings = { - global = { - ### Display ### - monitor = 0; - follow = "none"; - width = "(100, 500)"; - height = "(0, 300)"; - origin = "top-right"; - offset = "(5, 15)"; - scale = 0; - notification_limit = 10; - - ### Progress bar ### - progress_bar = true; - progress_bar_height = 14; - progress_bar_frame_width = 0; - progress_bar_min_width = 100; - progress_bar_max_width = 500; - progress_bar_corner_radius = 50; - progress_bar_corners = "bottom-left,top-right"; - icon_corner_radius = 0; - icon_corners = "all"; - - indicate_hidden = "yes"; - transparency = 0; - separator_height = 6; - padding = 10; - horizontal_padding = 8; - text_icon_padding = 12; - frame_width = 1; - frame_color = "#a0a0a0"; - gap_size = 6; - separator_color = "frame"; - corner_radius = 10; - corners = "bottom,top-left"; - - ### Text ### - font = "Iosevka Nerd Font"; - markup = "full"; - format = "%s\n%b"; - alignment = "left"; - vertical_alignment = "center"; - word_wrap = "yes"; - ellipsize = "middle"; - ignore_newline = "no"; - line_height = 0; - show_age_threshold = -1; - stack_duplicates = true; - hide_duplicate_count = false; - show_indicators = "yes"; - - ### Icons ### - icon_position = "right"; - min_icon_size = 32; - max_icon_size = 128; - enable_recursive_icon_lookup = true; - icon_theme = "Twitter Color Emoji"; - - ### History ### - sticky_history = "yes"; - history_length = 30; - - ### Behavior ### - sort = "yes"; - idle_threshold = 120; - always_run_script = true; - - ### Browser & Menu ### - browser = "${pkgs.firefox}/bin/firefox -new-tab"; - dmenu = "${pkgs.walker}/bin/walker --modules applications,translation,webesearch,clipboard,finder"; - - ### Misc ### - title = "Dunst"; - class = "Dunst"; - startup_notification = true; - ignore_dbusclose = false; - force_xwayland = false; - force_xinerama = false; - per_monitor_dpi = false; - - ### Mouse ### - mouse_left_click = "close_current"; - mouse_middle_click = "do_action,close_current"; - mouse_right_click = "close_all"; - }; - - urgency_low = { - background = "#222222"; - foreground = "#ffffff"; - highlight = "#722ae6,#e4b5cb"; - timeout = 20; - }; - - urgency_normal = { - background = "#222222"; - foreground = "#ffffff"; - frame_color = "#5e5086"; - highlight = "#722ae6,#e4b5cb"; - timeout = 20; - override_pause_level = 30; - }; - - urgency_critical = { - background = "#222222"; - foreground = "#ffffff"; - frame_color = "#d54e53"; - highlight = "#d54e53,#f0f0f0"; - timeout = 0; - override_pause_level = 60; - }; - }; - }; -} diff --git a/home/hyprland.nix b/home/hyprland.nix new file mode 100644 index 0000000..dcd9999 --- /dev/null +++ b/home/hyprland.nix @@ -0,0 +1,169 @@ +{ pkgs, ... }: +{ + + services.hyprpaper = { + enable = true; + settings = { + ipc = "on"; + preload = [ + "/etc/nixos/home/wallpapers/owl1.webp" + "/etc/nixos/home/wallpapers/owl2.webp" + "/etc/nixos/home/wallpapers/owl3.webp" + ]; + wallpaper = [ ", /etc/nixos/home/wallpapers/owl1.webp" ]; + }; + }; + + services.hyprpolkitagent.enable = true; + + services.hypridle = { + enable = true; + settings = { + general = { + after_sleep_cmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; + }; + + listener = [ + { + timeout = 300; + on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; + on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; + } + { + timeout = 600; + on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; + } + { + timeout = 900; # 15 minutes + on-timeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed + on-resume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. + } + { + timeout = 1800; + on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; + } + ]; + }; + }; + wayland.windowManager.hyprland = { + enable = true; + package = pkgs.hyprland; + systemd = { + variables = [ "--all" ]; + enable = true; + enableXdgAutostart = true; + }; + extraConfig = '' + gesture = 3, up, dispatcher, fullscreen 1 + gesture = 3, down, dispatcher, fullscreen 1 + gesture = 4, up, dispatcher, fullscreen 0 + gesture = 4, down, dispatcher, fullscreen 0 + gesture = 2, pinchout, dispatcher, splitratio 0.1 # approximating clockwise to pinchout + gesture = 2, pinchin, dispatcher, splitratio -0.1 # approximating anticlockwise to pinchin + gesture = 4, pinchin, close + gesture = 4, pinchout, dispatcher, exec ${pkgs.ghostty}/bin/ghostty + gesture = 2, left, dispatcher, workspace 1 # approximating left_up/left_down to left/right/up/down + gesture = 2, down, dispatcher, workspace 2 + gesture = 2, right, dispatcher, workspace 3 + gesture = 2, up, dispatcher, workspace 4 + + exec-once = ${pkgs.hyprlock}/bin/hyprlock --immediate; + ''; + xwayland.enable = true; + settings = { + monitor = ", preferred, auto, 1"; + general = { + gaps_out = 10; + }; + input = { + kb_layout = "us,fi"; + kb_options = "grp:alt_shift_toggle"; + scroll_method = "on_button_down"; + scroll_button = 274; + sensitivity = 0; # -1.0 - 1.0, 0 means no modification + repeat_delay = 180; + repeat_rate = 150; + touchpad = { + natural_scroll = true; + disable_while_typing = true; + tap-to-click = true; + middle_button_emulation = true; + }; + }; + decoration = { + dim_inactive = true; + }; + cursor = { + no_hardware_cursors = true; + }; + misc = { + disable_hyprland_logo = true; + disable_splash_rendering = true; + middle_click_paste = true; + }; + "$mainMod" = "SUPER"; + bind = [ + "$mainMod, V, exec, ${pkgs.ghostty}/bin/ghostty --class clipse -e 'clipse' " + "$mainMod, Return, exec, ${pkgs.ghostty}/bin/ghostty" + "$mainMod, d, exec, ${pkgs.walker}/bin/walker --modules applications,translation,webesearch,clipboard,finder" + "$mainMod, B, exec, ${pkgs.firefox}/bin/firefox" + "$mainMod, F, fullscreen" + "$mainMod, C, killactive," + "$mainMod, Tab, cyclenext" + ", Print, exec, ${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy && ${pkgs.wl-clipboard}/bin/wl-paste > ~/Pictures/screenshots/Screenshot-$(date +%F_%T).png && dunstify 'Screenshot of the whole screen taken' -t 1000" + ", XF86MonBrightnessUp, exec, brightnessctl s -e 5%+" + ", XF86MonBrightnessDown, exec, brightnessctl s -e 5%-" + ", XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + "$mainMod SHIFT, L, exec, hyprlock" + + # Move focus with mainMod + arrow keys + "$mainMod, left, movefocus, l" + "$mainMod, right, movefocus, r" + "$mainMod, up, movefocus, u" + "$mainMod, down, movefocus, d" + "$mainMod, H, movefocus, l" + "$mainMod, L, movefocus, r" + "$mainMod, K, movefocus, u" + "$mainMod, J, movefocus, d" + + "$mainMod SHIFT, left, swapwindow, l" + "$mainMod SHIFT, right, swapwindow, r" + "$mainMod SHIFT, up, swapwindow, u" + "$mainMod SHIFT, down, swapwindow, d" + + # Switch workspaces with mainMod + [0-9] + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + ]; + binde = [ ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ]; + bindm = [ + # Move/resize windows with mainMod + LMB/RMB and dragging + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + }; + }; +} diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix deleted file mode 100644 index dcd9999..0000000 --- a/home/hyprland/default.nix +++ /dev/null @@ -1,169 +0,0 @@ -{ pkgs, ... }: -{ - - services.hyprpaper = { - enable = true; - settings = { - ipc = "on"; - preload = [ - "/etc/nixos/home/wallpapers/owl1.webp" - "/etc/nixos/home/wallpapers/owl2.webp" - "/etc/nixos/home/wallpapers/owl3.webp" - ]; - wallpaper = [ ", /etc/nixos/home/wallpapers/owl1.webp" ]; - }; - }; - - services.hyprpolkitagent.enable = true; - - services.hypridle = { - enable = true; - settings = { - general = { - after_sleep_cmd = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; - ignore_dbus_inhibit = false; - lock_cmd = "${pkgs.procps}/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; - }; - - listener = [ - { - timeout = 300; - on-timeout = "${pkgs.brightnessctl}/bin/brightnessctl -s set 10"; - on-resume = "${pkgs.brightnessctl}/bin/brightnessctl -r"; - } - { - timeout = 600; - on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; - } - { - timeout = 900; # 15 minutes - on-timeout = "${pkgs.hyprland}/bin/hyprctl dispatch dpms off"; # screen off when timeout has passed - on-resume = "${pkgs.hyprland}/bin/hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. - } - { - timeout = 1800; - on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; - } - ]; - }; - }; - wayland.windowManager.hyprland = { - enable = true; - package = pkgs.hyprland; - systemd = { - variables = [ "--all" ]; - enable = true; - enableXdgAutostart = true; - }; - extraConfig = '' - gesture = 3, up, dispatcher, fullscreen 1 - gesture = 3, down, dispatcher, fullscreen 1 - gesture = 4, up, dispatcher, fullscreen 0 - gesture = 4, down, dispatcher, fullscreen 0 - gesture = 2, pinchout, dispatcher, splitratio 0.1 # approximating clockwise to pinchout - gesture = 2, pinchin, dispatcher, splitratio -0.1 # approximating anticlockwise to pinchin - gesture = 4, pinchin, close - gesture = 4, pinchout, dispatcher, exec ${pkgs.ghostty}/bin/ghostty - gesture = 2, left, dispatcher, workspace 1 # approximating left_up/left_down to left/right/up/down - gesture = 2, down, dispatcher, workspace 2 - gesture = 2, right, dispatcher, workspace 3 - gesture = 2, up, dispatcher, workspace 4 - - exec-once = ${pkgs.hyprlock}/bin/hyprlock --immediate; - ''; - xwayland.enable = true; - settings = { - monitor = ", preferred, auto, 1"; - general = { - gaps_out = 10; - }; - input = { - kb_layout = "us,fi"; - kb_options = "grp:alt_shift_toggle"; - scroll_method = "on_button_down"; - scroll_button = 274; - sensitivity = 0; # -1.0 - 1.0, 0 means no modification - repeat_delay = 180; - repeat_rate = 150; - touchpad = { - natural_scroll = true; - disable_while_typing = true; - tap-to-click = true; - middle_button_emulation = true; - }; - }; - decoration = { - dim_inactive = true; - }; - cursor = { - no_hardware_cursors = true; - }; - misc = { - disable_hyprland_logo = true; - disable_splash_rendering = true; - middle_click_paste = true; - }; - "$mainMod" = "SUPER"; - bind = [ - "$mainMod, V, exec, ${pkgs.ghostty}/bin/ghostty --class clipse -e 'clipse' " - "$mainMod, Return, exec, ${pkgs.ghostty}/bin/ghostty" - "$mainMod, d, exec, ${pkgs.walker}/bin/walker --modules applications,translation,webesearch,clipboard,finder" - "$mainMod, B, exec, ${pkgs.firefox}/bin/firefox" - "$mainMod, F, fullscreen" - "$mainMod, C, killactive," - "$mainMod, Tab, cyclenext" - ", Print, exec, ${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy && ${pkgs.wl-clipboard}/bin/wl-paste > ~/Pictures/screenshots/Screenshot-$(date +%F_%T).png && dunstify 'Screenshot of the whole screen taken' -t 1000" - ", XF86MonBrightnessUp, exec, brightnessctl s -e 5%+" - ", XF86MonBrightnessDown, exec, brightnessctl s -e 5%-" - ", XF86AudioRaiseVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume,exec,wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - "$mainMod SHIFT, L, exec, hyprlock" - - # Move focus with mainMod + arrow keys - "$mainMod, left, movefocus, l" - "$mainMod, right, movefocus, r" - "$mainMod, up, movefocus, u" - "$mainMod, down, movefocus, d" - "$mainMod, H, movefocus, l" - "$mainMod, L, movefocus, r" - "$mainMod, K, movefocus, u" - "$mainMod, J, movefocus, d" - - "$mainMod SHIFT, left, swapwindow, l" - "$mainMod SHIFT, right, swapwindow, r" - "$mainMod SHIFT, up, swapwindow, u" - "$mainMod SHIFT, down, swapwindow, d" - - # Switch workspaces with mainMod + [0-9] - "$mainMod, 1, workspace, 1" - "$mainMod, 2, workspace, 2" - "$mainMod, 3, workspace, 3" - "$mainMod, 4, workspace, 4" - "$mainMod, 5, workspace, 5" - "$mainMod, 6, workspace, 6" - "$mainMod, 7, workspace, 7" - "$mainMod, 8, workspace, 8" - "$mainMod, 9, workspace, 9" - "$mainMod, 0, workspace, 10" - - # Move active window to a workspace with mainMod + SHIFT + [0-9] - "$mainMod SHIFT, 1, movetoworkspace, 1" - "$mainMod SHIFT, 2, movetoworkspace, 2" - "$mainMod SHIFT, 3, movetoworkspace, 3" - "$mainMod SHIFT, 4, movetoworkspace, 4" - "$mainMod SHIFT, 5, movetoworkspace, 5" - "$mainMod SHIFT, 6, movetoworkspace, 6" - "$mainMod SHIFT, 7, movetoworkspace, 7" - "$mainMod SHIFT, 8, movetoworkspace, 8" - "$mainMod SHIFT, 9, movetoworkspace, 9" - "$mainMod SHIFT, 0, movetoworkspace, 10" - ]; - binde = [ ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" ]; - bindm = [ - # Move/resize windows with mainMod + LMB/RMB and dragging - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - }; - }; -} diff --git a/hosts/kataja/default.nix b/hosts/kataja/default.nix index 1a33fb0..840b224 100644 --- a/hosts/kataja/default.nix +++ b/hosts/kataja/default.nix @@ -35,7 +35,6 @@ RouteMetric = 600; UseMTU = true; }; - linkConfig.RequiredForOnline = "no"; }; "11-lan" = { matchConfig = { @@ -58,7 +57,6 @@ RouteMetric = 100; UseMTU = true; }; - linkConfig.RequiredForOnline = "no"; }; "12-lan" = { matchConfig = { @@ -72,7 +70,6 @@ ipv6AcceptRAConfig = { UseMTU = true; }; - linkConfig.RequiredForOnline = "no"; }; }; }; diff --git a/hosts/pihlaja/default.nix b/hosts/pihlaja/default.nix index 2cbcbab..3e49f68 100644 --- a/hosts/pihlaja/default.nix +++ b/hosts/pihlaja/default.nix @@ -94,7 +94,6 @@ ipv6AcceptRAConfig = { UseMTU = true; }; - linkConfig.RequiredForOnline = "no"; }; "11-lan" = { matchConfig.MACAddress = "18:c0:4d:04:cf:e9"; @@ -118,7 +117,6 @@ RouteMetric = 80; UseMTU = true; }; - linkConfig.RequiredForOnline = "yes"; }; }; }; -- cgit v1.2.3-70-g09d2