feat: update home-manager configuration

This commit is contained in:
Zhongheng Liu 2025-04-13 13:32:53 +03:00
commit b487953311
Signed by: steven
GPG key ID: 805A28B071DAD84B
18 changed files with 232 additions and 219 deletions

View file

@ -6,24 +6,11 @@ lib.mkIf config.usingMusicPlayerDaemon {
network.listenAddress = "any";
network.port = 6600;
extraConfig = ''
audio_output {
type "pipewire"
name "my pipewire output"
}
audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
quality "5.0" # do not define if bitrate is defined
# bitrate "128" # do not define if quality is defined
format "44100:16:1"
max_clients "5" # optional 0=no limit
}
audio_output {
type "pipewire"
name "my pipewire output"
}
'';
};
services.mpd-mpris = {
enable = true;
};
services.mpd-mpris = { enable = true; };
}

View file

@ -2,127 +2,7 @@
programs.waybar = {
enable = true;
systemd = { enable = true; };
style = ''
* {
font-family: JetBrainsMono Nerd Font;
}
'';
settings = {
mainBar = {
layer = "top";
position = "bottom";
height = 30;
output = [ "eDP-1" "eDP-2" "HDMI-A-1" ];
modules-left = [ "hyprland/workspaces" "hyprland/submap" ];
modules-center = [ "mpd" ];
modules-right =
[ "clock" "group/trays" "group/monitor" "wireplumber" "temperature" ];
"battery" = {
"bat" = "BAT1";
"format" = "BAT {capacity}% @ {power}W";
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"tray" = {
"icon-size" = 18;
"spacing" = 10;
};
"custom/tray-label" = { "format" = "[TRAY]"; };
"custom/monitor-label" = { "format" = "[HW]"; };
"group/trays" = {
"orientation" = "inherit";
"modules" = [ "custom/tray-label" "tray" ];
"drawer" = { "click-to-reveal" = true; };
};
"group/monitor" = {
"orientation" = "inherit";
"modules" = [ "custom/monitor-label" "battery" "cpu" "memory" ];
"drawer" = { "click-to-reveal" = true; };
};
"mpd" = {
"artist-len" = 10;
"album-len" = 10;
"title-len" = 20;
"format" =
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
"format-disconnected" = "Disconnected ";
"format-stopped" =
"{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
"interval" = 10;
"consume-icons" = {
"on" = " "; # Icon shows only when "consume" is on
};
"random-icons" = {
"off" = ''
<span color="#f53c3c"></span> ''; # Icon grayed out when "random" is off
"on" = " ";
};
"repeat-icons" = { "on" = " "; };
"single-icons" = { "on" = " 1 "; };
"state-icons" = {
"paused" = "";
"playing" = "";
};
"tooltip-format" = "MPD (connected)";
"tooltip-format-disconnected" = "MPD (disconnected)";
};
"wireplumber" = {
"format" = "{volume}% {icon}";
"format-muted" = "";
"format-icons" = [ "" "" "" ];
};
"cpu" = {
"format" = "CPU {icon}";
"format-icons" = [
"<span color='#69ff94'></span>" # green
"<span color='#2aa9ff'></span>" # blue
"<span color='#f8f8f2'></span>" # white
"<span color='#f8f8f2'></span>" # white
"<span color='#ffffa5'></span>" # yellow
"<span color='#ffffa5'></span>" # yellow
"<span color='#ff9977'></span>" # orange
"<span color='#dd532e'></span>" # red
];
"memory" = { "format" = "MEM {percentage}%"; };
};
"clock" = {
"format" = "{:%H:%M} ";
"format-alt" = "{:%A, %B %d, %Y (%R)}";
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
/* "actions" = {
"on-click-right" = "mode";
"on-scroll-up" = "tz_up";
"on-scroll-down" = "tz_down";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
*/
};
/* "custom/hello-from-waybar" = {
format = "hello {}";
max-length = 40;
interval = "once";
exec = pkgs.writeShellScript "hello-from-waybar" ''
echo "from within waybar"
'';
};
*/
};
};
style = "${import ./waybar_style.nix { }}";
settings = import ./waybar_config.nix;
};
}

View file

@ -0,0 +1,117 @@
{
mainBar = {
layer = "top";
position = "bottom";
height = 30;
output = [ "eDP-1" "eDP-2" "HDMI-A-1" ];
modules-left = [ "hyprland/workspaces" "hyprland/submap" ];
modules-center = [ "mpd" ];
modules-right =
[ "clock" "group/trays" "group/monitor" "wireplumber" "temperature" ];
"battery" = {
"bat" = "BAT1";
"format" = "BAT {capacity}% @ {power}W";
};
"hyprland/workspaces" = {
disable-scroll = true;
all-outputs = true;
};
"tray" = {
"icon-size" = 18;
"spacing" = 10;
};
"custom/tray-label" = { "format" = "[TRAY]"; };
"custom/monitor-label" = { "format" = "[HW]"; };
"group/trays" = {
"orientation" = "inherit";
"modules" = [ "custom/tray-label" "tray" ];
"drawer" = { "click-to-reveal" = true; };
};
"group/monitor" = {
"orientation" = "inherit";
"modules" = [ "custom/monitor-label" "battery" "cpu" "memory" ];
"drawer" = { "click-to-reveal" = true; };
};
"mpd" = {
"artist-len" = 10;
"album-len" = 10;
"title-len" = 20;
"format" =
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
"format-disconnected" = "Disconnected ";
"format-stopped" =
"{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
"interval" = 10;
"consume-icons" = {
"on" = " "; # Icon shows only when "consume" is on
};
"random-icons" = {
"off" = ''
<span color="#f53c3c"></span> ''; # Icon grayed out when "random" is off
"on" = " ";
};
"repeat-icons" = { "on" = " "; };
"single-icons" = { "on" = " 1 "; };
"state-icons" = {
"paused" = "";
"playing" = "";
};
"tooltip-format" = "MPD (connected)";
"tooltip-format-disconnected" = "MPD (disconnected)";
};
"wireplumber" = {
"format" = "{volume}% {icon}";
"format-muted" = "";
"format-icons" = [ "" "" "" ];
};
"cpu" = {
"format" = "CPU {icon}";
"format-icons" = [
"<span color='#69ff94'></span>" # green
"<span color='#2aa9ff'></span>" # blue
"<span color='#f8f8f2'></span>" # white
"<span color='#f8f8f2'></span>" # white
"<span color='#ffffa5'></span>" # yellow
"<span color='#ffffa5'></span>" # yellow
"<span color='#ff9977'></span>" # orange
"<span color='#dd532e'></span>" # red
];
"memory" = { "format" = "MEM {percentage}%"; };
};
"clock" = {
"format" = "{:%H:%M} ";
"format-alt" = "{:%A, %B %d, %Y (%R)}";
"tooltip-format" = "<tt><small>{calendar}</small></tt>";
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
/* "actions" = {
"on-click-right" = "mode";
"on-scroll-up" = "tz_up";
"on-scroll-down" = "tz_down";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
*/
};
/* "custom/hello-from-waybar" = {
format = "hello {}";
max-length = 40;
interval = "once";
exec = pkgs.writeShellScript "hello-from-waybar" ''
echo "from within waybar"
'';
};
*/
};
}

View file

@ -0,0 +1,4 @@
{ ... }: ''
* {
font-family: JetBrainsMono Nerd Font;
}''