diff --git a/modules/apps/hyprland/default.nix b/modules/apps/hyprland/default.nix index 46667da..8462525 100644 --- a/modules/apps/hyprland/default.nix +++ b/modules/apps/hyprland/default.nix @@ -13,6 +13,7 @@ with lib; { imports = [ ./waybar.nix + ./swaync.nix ]; home-manager.users.${username}.wayland.windowManager.hyprland = { @@ -43,7 +44,9 @@ with lib; exec-once = killall -q waybar;sleep .5 && waybar exec-once = killall -q swaync;sleep .5 && swaync exec-once = nm-applet --indicator + exec-once = blueman-applet exec-once = lxqt-policykit-agent + exec-once = [workspace special silent] foot exec-once = sleep 1.5 && swww img /home/${username}/Pictures/Wallpapers/pink-desert.jpeg ${builtins.toString config.desktop.hostMonitorSettings} exec-once = ${terminal} @@ -101,6 +104,7 @@ with lib; animation = border, 1, 1, liner animation = fade, 1, 10, default animation = workspaces, 1, 5, wind + animation = specialWorkspace, 1, 4, default, slidefadevert 20% } decoration { rounding = 10 @@ -120,6 +124,9 @@ with lib; pseudotile = true preserve_split = true } + bind = ${modifier}SHIFT,Q,exit, + bind = ${modifier},ESCAPE,killactive, + bind = ${modifier},GRAVE,toggleSpecialWorkspace bind = ${modifier},Return,exec,${terminal} bind = ${modifier}SHIFT,Return,exec,rofi-launcher bind = ${modifier}SHIFT,W,exec,web-search @@ -135,12 +142,10 @@ with lib; bind = ${modifier}SHIFT,G,exec,godot4 bind = ${modifier},T,exec,thunar bind = ${modifier},M,exec,spotify - bind = ${modifier},Q,killactive, bind = ${modifier},P,pseudo, bind = ${modifier}SHIFT,I,togglesplit, bind = ${modifier},F,fullscreen, bind = ${modifier}SHIFT,F,togglefloating, - bind = ${modifier}SHIFT,C,exit, bind = ${modifier}SHIFT,left,movewindow,l bind = ${modifier}SHIFT,right,movewindow,r bind = ${modifier}SHIFT,up,movewindow,u diff --git a/modules/apps/hyprland/swaync.nix b/modules/apps/hyprland/swaync.nix new file mode 100644 index 0000000..f452a0a --- /dev/null +++ b/modules/apps/hyprland/swaync.nix @@ -0,0 +1,314 @@ +{ config, username, ... }: + +{ + home-manager.users.${username}.home.file = { + ".config/swaync/config.json".text = '' + { + "$schema": "/etc/xdg/swaync/configSchema.json", + "positionX": "right", + "positionY": "top", + "control-center-margin-top": 10, + "control-center-margin-bottom": 10, + "control-center-margin-right": 10, + "control-center-margin-left": 10, + "notification-icon-size": 64, + "notification-body-image-height": 100, + "notification-body-image-width": 200, + "timeout": 10, + "timeout-low": 5, + "timeout-critical": 0, + "fit-to-screen": false, + "control-center-width": 500, + "control-center-height": 1025, + "notification-window-width": 500, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-time": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "widgets": [ + "title", + "mpris", + "volume", + "backlight", + "dnd", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notification Center", + "clear-all-button": true, + "button-text": "󰆴 Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "label": { + "max-lines": 1, + "text": "Notification Center" + }, + "mpris": { + "image-size": 96, + "image-radius": 7 + }, + "volume": { + "label": "󰕾" + }, + "backlight": { + "label": "󰃟" + }, + } + } + ''; + ".config/swaync/style.css".text = '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-weight: bold; + } + .control-center .notification-row:focus, + .control-center .notification-row:hover { + opacity: 0.9; + background: #${config.lib.stylix.colors.base00} + } + .notification-row { + outline: none; + margin: 10px; + padding: 0; + } + .notification { + background: transparent; + padding: 0; + margin: 0px; + } + .notification-content { + background: #${config.lib.stylix.colors.base00}; + padding: 10px; + border-radius: 5px; + border: 2px solid #${config.lib.stylix.colors.base0D}; + margin: 0; + } + .notification-default-action { + margin: 0; + padding: 0; + border-radius: 5px; + } + .close-button { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + text-shadow: none; + padding: 0; + border-radius: 5px; + margin-top: 5px; + margin-right: 5px; + } + .close-button:hover { + box-shadow: none; + background: #${config.lib.stylix.colors.base0D}; + transition: all .15s ease-in-out; + border: none + } + .notification-action { + border: 2px solid #${config.lib.stylix.colors.base0D}; + border-top: none; + border-radius: 5px; + } + .notification-default-action:hover, + .notification-action:hover { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base0B} + } + .notification-default-action { + border-radius: 5px; + margin: 0px; + } + .notification-default-action:not(:only-child) { + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px + } + .notification-action:first-child { + border-bottom-left-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .notification-action:last-child { + border-bottom-right-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .inline-reply { + margin-top: 8px + } + .inline-reply-entry { + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base05}; + caret-color: #${config.lib.stylix.colors.base05}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px + } + .inline-reply-button { + margin-left: 4px; + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px; + color: #${config.lib.stylix.colors.base05} + } + .inline-reply-button:disabled { + background: initial; + color: #${config.lib.stylix.colors.base03}; + border: 1px solid transparent + } + .inline-reply-button:hover { + background: #${config.lib.stylix.colors.base00} + } + .body-image { + margin-top: 6px; + background-color: #${config.lib.stylix.colors.base05}; + border-radius: 5px + } + .summary { + font-size: 16px; + font-weight: 700; + background: transparent; + color: rgba(158, 206, 106, 1); + text-shadow: none + } + .time { + font-size: 16px; + font-weight: 700; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + margin-right: 18px + } + .body { + font-size: 15px; + font-weight: 400; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none + } + .control-center { + background: #${config.lib.stylix.colors.base00}; + border: 2px solid #${config.lib.stylix.colors.base0C}; + border-radius: 5px; + } + .control-center-list { + background: transparent + } + .control-center-list-placeholder { + opacity: .5 + } + .floating-notifications { + background: transparent + } + .blank-window { + background: alpha(black, 0) + } + .widget-title { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + font-size: 1.5rem; + border-radius: 5px; + } + .widget-title>button { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + background: #${config.lib.stylix.colors.base00}; + box-shadow: none; + border-radius: 5px; + } + .widget-title>button:hover { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + } + .widget-dnd { + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: large; + color: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch { + border-radius: 5px; + /* border: 1px solid #${config.lib.stylix.colors.base0B}; */ + background: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch:checked { + background: #${config.lib.stylix.colors.base08}; + border: 1px solid #${config.lib.stylix.colors.base08}; + } + .widget-dnd>switch slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-dnd>switch:checked slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-label { + margin: 10px 10px 5px 10px; + } + .widget-label>label { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + } + .widget-mpris { + color: #${config.lib.stylix.colors.base05}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + } + .widget-mpris > box > button { + border-radius: 5px; + } + .widget-mpris-player { + padding: 5px 10px; + margin: 10px + } + .widget-mpris-title { + font-weight: 700; + font-size: 1.25rem + } + .widget-mpris-subtitle { + font-size: 1.1rem + } + .widget-menubar>box>.menu-button-bar>button { + border: none; + background: transparent + } + .topbar-buttons>button { + border: none; + background: transparent + } + .widget-volume { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05}; + } + .widget-volume>box>button { + background: #${config.lib.stylix.colors.base0B}; + border: none + } + .per-app-volume { + background-color: #${config.lib.stylix.colors.base00}; + padding: 4px 8px 8px; + margin: 0 8px 8px; + border-radius: 5px; + } + .widget-backlight { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05} + } + ''; + }; +} diff --git a/modules/apps/hyprland/waybar.nix b/modules/apps/hyprland/waybar.nix index 7036fe7..c5bda60 100644 --- a/modules/apps/hyprland/waybar.nix +++ b/modules/apps/hyprland/waybar.nix @@ -12,266 +12,276 @@ let in with lib; { - # Configure & Theme Waybar - home-manager.users.${username}.programs.waybar = { - enable = true; - package = pkgs.waybar; - settings = [ - { - layer = "top"; - position = "top"; - modules-center = [ "hyprland/workspaces" ]; - modules-left = [ - "custom/startmenu" - "hyprland/window" - "pulseaudio" - "cpu" - "memory" - "idle_inhibitor" - ]; - modules-right = [ - "custom/hyprbindings" - "custom/notification" - "custom/exit" - "battery" - "tray" - "clock" - ]; - "hyprland/workspaces" = { - format = "{name}"; - format-icons = { - default = " "; - active = " "; - urgent = " "; - }; - on-scroll-up = "hyprctl dispatch workspace e+1"; - on-scroll-down = "hyprctl dispatch workspace e-1"; - }; - "clock" = { - format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}''; - tooltip = true; - tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; - }; - "hyprland/window" = { - max-length = 22; - separate-outputs = false; - rewrite = { - "" = " 🙈 No Windows? "; - }; - }; - "memory" = { - interval = 5; - format = " {}%"; - tooltip = true; - }; - "cpu" = { - interval = 5; - format = " {usage:2}%"; - tooltip = true; - }; - "disk" = { - format = " {free}"; - tooltip = true; - }; - "network" = { - format-icons = [ - "󰤯" - "󰤟" - "󰤢" - "󰤥" - "󰤨" + # Configure & Theme Waybar + home-manager.users.${username} = { + home.packages = with pkgs; [ + (writeShellScriptBin "task-waybar" '' + sleep 0.1 + ${pkgs.swaynotificationcenter}/bin/swaync-client -t & + '') + ]; + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + modules-center = [ "hyprland/workspaces" ]; + modules-left = [ + "custom/startmenu" + "hyprland/window" + "pulseaudio" + "cpu" + "memory" + "idle_inhibitor" ]; - format-ethernet = " {bandwidthDownOctets}"; - format-wifi = "{icon} {signalStrength}%"; - format-disconnected = "󰤮"; - tooltip = false; - }; - "tray" = { - spacing = 12; - }; - "pulseaudio" = { - format = "{icon} {volume}% {format_source}"; - format-bluetooth = "{volume}% {icon} {format_source}"; - format-bluetooth-muted = " {icon} {format_source}"; - format-muted = " {format_source}"; - format-source = " {volume}%"; - format-source-muted = ""; - format-icons = { - headphone = ""; - hands-free = ""; - headset = ""; - phone = ""; - portable = ""; - car = ""; - default = [ - "" - "" - "" + modules-right = [ + "custom/hyprbindings" + "custom/notification" + "custom/exit" + "battery" + "tray" + "clock" + ]; + + "hyprland/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; + }; + on-scroll-up = "hyprctl dispatch workspace e+1"; + on-scroll-down = "hyprctl dispatch workspace e-1"; + }; + "clock" = { + interval = 1; + format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M:%S %p}''; + tooltip = true; + tooltip-format = "{:%A, %d %B %Y }\n{calendar}"; + }; + "hyprland/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; + }; + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = " {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; }; - on-click = "sleep 0.1 && pavucontrol"; - }; - "custom/exit" = { - tooltip = false; - format = ""; - on-click = "sleep 0.1 && wlogout"; - }; - "custom/startmenu" = { - tooltip = false; - format = ""; - # exec = "rofi -show drun"; - on-click = "sleep 0.1 && rofi-launcher"; - }; - "custom/hyprbindings" = { - tooltip = false; - format = "󱕴"; - on-click = "sleep 0.1 && list-hypr-bindings"; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = ""; - deactivated = ""; + "tray" = { + spacing = 12; }; - tooltip = "true"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon} {}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - inhibited-notification = ""; - inhibited-none = ""; - dnd-inhibited-notification = ""; - dnd-inhibited-none = ""; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" + ]; + }; + on-click = "sleep 0.1 && pavucontrol"; }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "sleep 0.1 && task-waybar"; - escape = true; - }; - "battery" = { - states = { - warning = 30; - critical = 15; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + # exec = "rofi -show drun"; + on-click = "sleep 0.1 && rofi-launcher"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-hypr-bindings"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; }; - format = "{icon} {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󱘖 {capacity}%"; - format-icons = [ - "󰁺" - "󰁻" - "󰁼" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - on-click = ""; - tooltip = false; - }; - } - ]; - style = concatStrings [ - '' - * { - font-family: JetBrainsMono Nerd Font Mono; - font-size: 16px; - border-radius: 0px; - border: none; - min-height: 0px; } - window#waybar { - background: rgba(0,0,0,0); - } - #workspaces { - color: #${config.lib.stylix.colors.base00}; - background: #${config.lib.stylix.colors.base01}; - margin: 4px 4px; - padding: 5px 5px; - border-radius: 16px; - } - #workspaces button { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.5; - transition: ${betterTransition}; - } - #workspaces button.active { - font-weight: bold; - padding: 0px 5px; - margin: 0px 3px; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - transition: ${betterTransition}; - opacity: 1.0; - min-width: 40px; - } - #workspaces button:hover { - font-weight: bold; - border-radius: 16px; - color: #${config.lib.stylix.colors.base00}; - background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); - opacity: 0.8; - transition: ${betterTransition}; - } - tooltip { - background: #${config.lib.stylix.colors.base00}; - border: 1px solid #${config.lib.stylix.colors.base08}; - border-radius: 12px; - } - tooltip label { - color: #${config.lib.stylix.colors.base08}; - } - #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { - font-weight: bold; - margin: 4px 0px; - margin-left: 7px; - padding: 0px 18px; - background: #${config.lib.stylix.colors.base04}; - color: #${config.lib.stylix.colors.base00}; - border-radius: 24px 10px 24px 10px; - } - #custom-startmenu { - color: #${config.lib.stylix.colors.base0B}; - background: #${config.lib.stylix.colors.base02}; - font-size: 28px; - margin: 0px; - padding: 0px 30px 0px 15px; - border-radius: 0px 0px 40px 0px; - } - #custom-hyprbindings, #network, #battery, - #custom-notification, #tray, #custom-exit { - font-weight: bold; - background: #${config.lib.stylix.colors.base0F}; - color: #${config.lib.stylix.colors.base00}; - margin: 4px 0px; - margin-right: 7px; - border-radius: 10px 24px 10px 24px; - padding: 0px 18px; - } - #clock { - font-weight: bold; - color: #0D0E15; - background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C}); - margin: 0px; - padding: 0px 15px 0px 30px; - border-radius: 0px 0px 0px 40px; - } - '' - ]; + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 16px; + border-radius: 0px; + border: none; + min-height: 0px; + } + window#waybar { + background: transparent; + } + #workspaces { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base00}; + margin: 4px 4px; + padding: 5px 5px; + border-radius: 16px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base0E}; + background: #${config.lib.stylix.colors.base00}; + opacity: 0.5; + transition: ${betterTransition}; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base0E}; + background: #${config.lib.stylix.colors.base00};; + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.8; + transition: ${betterTransition}; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base08}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base08}; + } + #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { + font-weight: bold; + margin: 4px 0px; + margin-left: 7px; + padding: 0px 18px; + color: #${config.lib.stylix.colors.base06}; + background: #${config.lib.stylix.colors.base02}; + border-radius: 24px 10px 24px 10px; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base02}; + font-size: 28px; + margin: 0px; + padding: 0px 30px 0px 15px; + border-radius: 0px 0px 40px 0px; + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #tray, #custom-exit { + font-weight: bold; + color: #${config.lib.stylix.colors.base0D}; + background: #${config.lib.stylix.colors.base02}; + margin: 4px 0px; + margin-right: 7px; + border-radius: 10px 24px 10px 24px; + padding: 0px 18px; + } + #clock { + font-weight: bold; + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base02}; + margin: 0px; + padding: 0px 15px 0px 30px; + border-radius: 0px 0px 0px 40px; + } + '' + ]; + }; }; } diff --git a/modules/components/networking/default.nix b/modules/components/networking/default.nix index d63c226..efcdf4f 100644 --- a/modules/components/networking/default.nix +++ b/modules/components/networking/default.nix @@ -1,5 +1,6 @@ { lib, + pkgs, config, username, ... @@ -27,5 +28,32 @@ in useDHCP = lib.mkDefault true; wireguard.enable = true; }; + + # Fix for automatic-timezoned not working currently (Jan 2025) + systemd.services.set-timezone = { + description = "Kludgily set the timezone based on IP, with an API request to some sketchasaurus website."; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.writeShellScript "set-timezone.sh" '' + + IP=$(${pkgs.curl}/bin/curl -s https://api.ipify.org) + /run/current-system/sw/bin/logger "Got IP $IP." + + ${pkgs.curl}/bin/curl "https://api.ipgeolocation.io/timezone?apiKey=2309807339f84c26a2cb8cb44c31e183&ip=$IP" > /tmp/tz + + TZ=$(${pkgs.jq}/bin/jq -r .timezone < /tmp/tz) + timedatectl set-timezone $TZ + + /run/current-system/sw/bin/logger "Set timezone to $TZ." + ''}"; + Restart = "no"; + StandardOutput = "journal"; + StandardError = "journal"; + }; + }; + }; } diff --git a/modules/components/theming/default.nix b/modules/components/theming/default.nix index 850b136..2e12517 100644 --- a/modules/components/theming/default.nix +++ b/modules/components/theming/default.nix @@ -20,12 +20,47 @@ in config = lib.mkIf cfg.enable { stylix = { enable = true; - image = ./wallpapers/mountainscapedark.jpg; - base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; autoEnable = true; + image = ./wallpapers/biking-sunset.jpg; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + opacity.terminal = 0.8; + cursor.package = pkgs.bibata-cursors; + cursor.name = "Bibata-Modern-Ice"; + cursor.size = 24; + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font Mono"; + }; + sansSerif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + serif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + sizes = { + applications = 12; + terminal = 15; + desktop = 11; + popups = 12; + }; + }; + }; + fonts = { + packages = with pkgs; [ + noto-fonts-emoji + noto-fonts-cjk-sans + font-awesome + material-icons + ]; }; home-manager.users.${username}.stylix = { - targets.kitty.enable = true; + targets = { + kitty.enable = true; + foot.enable = true; + }; autoEnable = true; }; diff --git a/modules/components/theming/wallpapers/biking-sunset.jpg b/modules/components/theming/wallpapers/biking-sunset.jpg new file mode 100644 index 0000000..3e49f29 Binary files /dev/null and b/modules/components/theming/wallpapers/biking-sunset.jpg differ diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 63f7ffd..f51370c 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -47,11 +47,10 @@ in hardware = { bluetooth = { enable = true; + powerOnBoot = true; settings = { General = { - AutoEnable = false; - ControllerMode = "bredr"; - Experimental = "true"; + AutoEnable = true; }; # https://reddit.com/r/NixOS/comments/1aoteqb/keychron_k1_pro_bluetooth_nixos_wkde_install/kq49q9r/?context=3 }; }; @@ -70,6 +69,7 @@ in # interval = "weekly"; # }; # }; + blueman.enable = true; devmon.enable = true; fwupd.enable = true; geoclue2 = { @@ -82,7 +82,17 @@ in enable = true; }; }; - + # NixOS system programs + programs = { + thunar = { + enable = true; + plugins = with pkgs.xfce; [ + thunar-archive-plugin + thunar-volman + ]; + }; + foot.enable = true; + }; home-manager.users.${username} = { pkgs, @@ -91,10 +101,19 @@ in ... }: { - programs.kitty.enable = true; + # Home-manager programs + programs = { + kitty.enable = true; + }; home.packages = with pkgs; [ + # GUI Apps firefox filezilla + spotify + + # Utilities + networkmanagerapplet + swaynotificationcenter ]; xdg = { mimeApps =