diff --git a/home-manager/waybar.nix b/home-manager/waybar.nix index 750dd6f..7252dac 100644 --- a/home-manager/waybar.nix +++ b/home-manager/waybar.nix @@ -1,73 +1,73 @@ -{ ... }: { - programs.waybar.enable = true; - programs.waybar.settings = { - mainBar = { - height = 35; - spacing = 4; - modules-left = [ ]; - modules-center = [ - "clock" - ]; - modules-right = [ - "privacy" - "pulseaudio" - "cpu" - "memory" - "tray" - ]; - clock = { - format = "{:%a %F %H:%M}"; - "tooltip-format" = "{calendar}"; - "calendar" = { - "mode" = "year"; - "mode-mon-col" = 3; - "weeks-pos" = "right"; - "on-scroll" = 1; - "format" = { - "months" = "{}"; - "days" = "{}"; - "weeks" = "W{}"; - "weekdays" = "{}"; - "today" = "{}"; +{ config, ... }: { + home.file."${config.xdg.configHome}/waybar/config.jsonc" = { + text = + builtins.toJSON { + height = 35; + spacing = 4; + modules-left = [ ]; + modules-center = [ + "clock" + ]; + modules-right = [ + "privacy" + "pulseaudio" + "cpu" + "memory" + "tray" + ]; + clock = { + format = "{:%a %F %H:%M}"; + "tooltip-format" = "{calendar}"; + "calendar" = { + "mode" = "year"; + "mode-mon-col" = 3; + "weeks-pos" = "right"; + "on-scroll" = 1; + "format" = { + "months" = "{}"; + "days" = "{}"; + "weeks" = "W{}"; + "weekdays" = "{}"; + "today" = "{}"; + }; + }; + "actions" = { + "on-click-right" = "mode"; + "on-scroll-up" = "shift_up"; + "on-scroll-down" = "shift_down"; }; }; - "actions" = { - "on-click-right" = "mode"; - "on-scroll-up" = "shift_up"; - "on-scroll-down" = "shift_down"; + pulseaudio = { + # "scroll-step": 1, // %, can be a float + "format" = "{volume}% {icon} {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" = "pavucontrol"; }; - }; - pulseaudio = { - # "scroll-step": 1, // %, can be a float - "format" = "{volume}% {icon} {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" = [ "" "" "" ]; + + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + tray = { + spacing = 10; }; - "on-click" = "pavucontrol"; - }; - cpu = { - format = "{usage}% "; - tooltip = false; }; - memory = { - format = "{}% "; - }; - tray = { - spacing = 10; - }; - - }; }; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 1530c74..ed5fad5 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -179,6 +179,7 @@ in }; services.displayManager.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring ]; + programs.waybar.enable = true; # TODO: Create a fancontrol config hardware.fancontrol.enable = false;