Updates to git delta config, waybar config, and others

This commit is contained in:
Nate Anderson 2025-08-11 14:53:04 -06:00
parent 98b45d64f7
commit 9436e1504f
9 changed files with 239 additions and 73 deletions

33
flake.lock generated
View File

@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"auto-cpufreq": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1752998173,
"narHash": "sha256-ZlYpBp2WOe03UrpjJGz5KTOL/pp7A452hJO/Vc8C4/0=",
"owner": "AdnanHodzic",
"repo": "auto-cpufreq",
"rev": "562278377ffa96f3c1af49c7b499df028ce8d8bd",
"type": "github"
},
"original": {
"owner": "AdnanHodzic",
"repo": "auto-cpufreq",
"type": "github"
}
},
"catppuccin": { "catppuccin": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
@ -78,11 +98,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1754214453, "lastModified": 1754725699,
"narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=", "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376", "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -94,11 +114,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1754028485, "lastModified": 1754767907,
"narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", "narHash": "sha256-8OnUzRQZkqtUol9vuUuQC30hzpMreKptNyET2T9lB6g=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "59e69648d345d6e8fef86158c555730fa12af9de", "rev": "c5f08b62ed75415439d48152c2a784e36909b1bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -146,6 +166,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"auto-cpufreq": "auto-cpufreq",
"catppuccin": "catppuccin", "catppuccin": "catppuccin",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",

View File

@ -8,17 +8,23 @@
url = "github:nix-community/home-manager/release-25.05"; url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# bonus inputs
catppuccin.url = "github:catppuccin/nix"; catppuccin.url = "github:catppuccin/nix";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
auto-cpufreq = {
url = "github:AdnanHodzic/auto-cpufreq";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, catppuccin, nur, home-manager, ... } @ inputs: outputs = { self, nixpkgs, nixpkgs-unstable, catppuccin, nur, home-manager, auto-cpufreq, ... } @ inputs:
let let
inherit (self) outputs; inherit (self) outputs;
system = "x86_64-linux"; system = "x86_64-linux";
timeZone = "America/Denver"; timeZone = "America/Denver";
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
unstablePkgs = import nixpkgs-unstable { system = system; config = { allowUnfree = true; }; }; unstablePkgs = import nixpkgs-unstable { system = system; config = { allowUnfree = true; }; };
# pkgs23 = import nixpkgs-23 { system = system; config = { allowUnfree = true; }; }; # pkgs23 = import nixpkgs-23 { system = system; config = { allowUnfree = true; }; };
in in
{ {
@ -65,6 +71,7 @@
}; };
modules = [ modules = [
catppuccin.nixosModules.catppuccin catppuccin.nixosModules.catppuccin
auto-cpufreq.nixosModules.default
# Setup home manager # Setup home manager
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View File

@ -30,7 +30,7 @@ in
modules/user/main_user.nix modules/user/main_user.nix
modules/sway/sway_conf.nix modules/sway/sway_conf.nix
modules/hypr/hyprland.nix modules/hypr/hyprland.nix
../shared/modules/system/power_manager.nix
# inputs.nur.hmModules.nur # inputs.nur.hmModules.nur
]; ];
@ -67,6 +67,11 @@ in
brscan5.enable = true; brscan5.enable = true;
}; };
power_manager = {
enable = true;
useFlake = true;
};
main_user = { main_user = {
enable = true; enable = true;
userName = deskCfg.userName; userName = deskCfg.userName;

View File

@ -1,11 +1,11 @@
// Global // Global
{ {
"layer": "top", "layer": "bottom",
"position": "top", "position": "top",
"margin-top": 0, "margin-top": 3,
"margin-left": 10, "margin-left": 3,
"margin-right": 10, "margin-right": 3,
"margin-bottom": 0, "margin-bottom": 3,
// If height property would be not present, it'd be calculated dynamically // If height property would be not present, it'd be calculated dynamically
// "height": 60, // "height": 60,
@ -26,16 +26,16 @@
], ],
"modules-right": [ "modules-right": [
"network", "clock",
"idle_inhibitor", // "network", // using network applet in tray
// "idle_inhibitor",
"custom/storage",
"memory", "memory",
"cpu", "cpu",
"pulseaudio", "pulseaudio",
"custom/keyboard-layout", "custom/keyboard-layout",
"battery", "battery",
"backlight#icon", "backlight",
"backlight#value",
"clock",
"tray", "tray",
//"custom/weather", //"custom/weather",
"custom/power", "custom/power",
@ -57,7 +57,7 @@
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon}", "format": "{icon} {capacity}%",
"format-charging": "{capacity}% 󰂄", "format-charging": "{capacity}% 󰂄",
"format-plugged": "{capacity}% ", "format-plugged": "{capacity}% ",
// "format-good": "", // An empty format will hide the module // "format-good": "", // An empty format will hide the module
@ -79,13 +79,13 @@
"warning": 70, "warning": 70,
"critical": 90, "critical": 90,
}, },
"on-click": "foot -e 'htop'", "on-click": "ghostty -e 'htop'",
}, },
"memory": { "memory": {
"interval": 5, "interval": 5,
"format": " {}%", // Icon: memory "format": " {}%", // Icon: memory
"on-click": "foot -e 'htop'", "on-click": "ghostty -e 'htop'",
"states": { "states": {
"warning": 70, "warning": 70,
"critical": 90 "critical": 90
@ -94,17 +94,17 @@
"network": { "network": {
"interval": 5, "interval": 5,
"format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi "format-wifi": "", // Icon: wifi
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet "format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
"format-disconnected": "⚠ Disconnected", "format-disconnected": "⚠ Disconnected",
"tooltip-format": "{ifname}: {ipaddr}", "tooltip-format": "{essid} - {ifname}:{ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
"on-click": "foot -e 'nmtui'", "on-click": "ghostty -e 'nmtui'",
}, },
"network#vpn": { "network#vpn": {
"interface": "tun0", "interface": "tun0",
"format": " {essid} ({signalStrength}%)", "format": " {signalStrength}%",
"format-disconnected": "⚠ Disconnected", "format-disconnected": "⚠ Disconnected",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}", "tooltip-format": "{essid} - {ifname}:{ipaddr} {bandwidthUpBytes} {bandwidthDownBytes}",
}, },
"hyprland/window": { "hyprland/window": {
@ -114,21 +114,21 @@
"icon_size": 30, "icon_size": 30,
"rewrite": { "rewrite": {
// Firefox // Firefox
"(.*) — Mozilla Firefox": "󰖟 $1", "(.*) — Mozilla Firefox": " $1",
"(.*) - Mozilla Firefox": "󰖟 $1", "(.*) - Mozilla Firefox": " $1",
"Mozilla Firefox": "󰖟 Firefox", "Mozilla Firefox": " Firefox",
// Chrome/Chromium // Chrome/Chromium
"(.*) - Google Chrome": "󰖟 $1", "(.*) - Google Chrome": " $1",
"(.*) - Chromium": "󰖟 $1", "(.*) - Chromium": " $1",
"Google Chrome": "󰖟 Chrome", "Google Chrome": " Chrome",
"Chromium": "󰖟 Chromium", "Chromium": " Chromium",
// Terminal applications // Terminal applications
"(.*) - zsh": " $1", "(.*) - zsh": " $1",
"(.*) - bash": " $1", "(.*) - bash": " $1",
"(.*) - fish": " $1", "(.*) - fish": " $1",
"foot": " Terminal", "ghostty": " Terminal",
"kitty": " Terminal", "kitty": " Terminal",
"alacritty": " Terminal", "alacritty": " Terminal",
"ghostty": " Terminal", "ghostty": " Terminal",
@ -209,20 +209,20 @@
"pulseaudio": { "pulseaudio": {
"scroll-step": 1, // %, can be a float "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon}", "format": "{icon} {volume}%",
"format-bluetooth": "{volume}% {icon}  {format_source}", "format-bluetooth": "{volume}% {icon}  {format_source}",
"format-bluetooth-muted": " {icon}  {format_source}", "format-bluetooth-muted": " {icon}  {format_source}",
"format-muted": " {format_source}", "format-muted": " {format_source}",
"format-source": "{volume}% ", "format-source": "{volume}% ",
"format-source-muted": "", "format-source-muted": "",
"format-icons": { "format-icons": {
"headphone": "", "headphone": ["", "", "", "", ""],
"hands-free": "", "hands-free": "",
"headset": "", "headset": "",
"phone": "", "phone": "",
"portable": "", "portable": "",
"car": "", "car": "",
"default": [""] "default": ["", "", ""]
}, },
"on-click": "pavucontrol", "on-click": "pavucontrol",
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%", "on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
@ -236,24 +236,32 @@
// }, // },
"tray": { "tray": {
"icon-size": 18, "icon-size": 20,
"spacing":10, "spacing":10,
}, },
"backlight#icon": { "backlight": {
"format": "{icon}", "format": "{icon} {percent}%",
"format-icons": [""], "format-icons": ["󰹐", "󱩏", "󱩑", "󱩓", "󱩕", "󰛨"],
"on-scroll-down": "brightnessctl -c backlight set 1%-", "on-scroll-down": "brightnessctl -c backlight set 1%-",
"on-scroll-up": "brightnessctl -c backlight set +1%" "on-scroll-up": "brightnessctl -c backlight set +1%",
"min-brightness": 1
}, },
"backlight#value" :{ "custom/storage": {
"format": "{percent}%", "format": "{icon} {percentage}%",
"on-scroll-down": "brightnessctl -c backlight set 1%-", "format-icons": {
"on-scroll-up": "brightnessctl -c backlight set +1%" "default": "",
"warning": "",
"critical": "",
},
"exec": "usage=$(df / --output=pcent | tail -n1 | tr -d ' %'); if [ $usage -ge 90 ]; then class=\"critical\"; elif [ $usage -ge 75 ]; then class=\"warning\"; else class=\"default\"; fi; echo \"{\\\"percentage\\\":$usage,\\\"class\\\":\\\"$class\\\"}\"",
"return-type": "json",
"interval": 30,
"tooltip-format": "Root filesystem: {percentage}% used",
}, },
"custom/signal": { "custom/signal": {
"format": "  ", "format": "  ",
"on-click": "exec signal", "on-click": "exec signal",
"tooltip": false, "tooltip": false,

View File

@ -68,8 +68,8 @@
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 40px; min-height: 40px;
margin: 1px; margin: 0px;
padding: 0; padding: 0px;
} }
/* The whole bar */ /* The whole bar */
@ -77,7 +77,7 @@
background: transparent; background: transparent;
background-color: transparent; background-color: transparent;
font-family: Overpass Nerd Font; font-family: Overpass Nerd Font;
font-size: 20px; font-size: 22px;
color: @text; color: @text;
} }
@ -112,25 +112,49 @@
border-color: @surface0; border-color: @surface0;
} }
/* Add gaps for middle module so they space out and dont touch */
.modules-center {
margin: 0px 100px;
}
/* Every modules */ /* Every modules */
#backlight,
#battery, #battery,
#clock, #clock,
#backlight,
#cpu, #cpu,
#custom-storage,
#custom-keyboard-layout, #custom-keyboard-layout,
#custom-PBPbattery,
#custom-weather,
#idle_inhibitor,
#memory, #memory,
#mode, #mode,
#custom-weather,
#network, #network,
#pulseaudio, #pulseaudio,
#temperature, #temperature,
#tray, #tray {
#idle_inhibitor,
#custom-PBPbattery {
padding: 0.5rem 0.6rem; padding: 0.5rem 0.6rem;
margin: 1px 0px; margin: 1px 0px;
} }
#clock {
margin-left: 5px;
margin-right: 5px;
min-width: 140px;
}
#backlight,
#battery,
#cpu,
#custom-storage,
#memory,
#network,
#pulseaudio,
#temperature {
min-width: 90px;
}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* Modules styles * Modules styles
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
@ -141,11 +165,13 @@
animation-direction: alternate; animation-direction: alternate;
} }
#battery.warning { #battery.warning,
#custom-storage.warning {
color: @flamingo; color: @flamingo;
} }
#battery.critical { #battery.critical,
#custom-storage.critical {
color: @red; color: @red;
} }
@ -212,6 +238,8 @@
#window { #window {
font-weight: bold; font-weight: bold;
margin-left: 20px;
margin-right: 10px;
} }
#workspaces { #workspaces {
@ -296,7 +324,7 @@
#custom-power { #custom-power {
margin-left: 15px; margin-left: 15px;
margin-right: 15px; margin-right: 15px;
font-size: 15px; font-size: 20px;
color: @flamingo; color: @flamingo;
} }
@ -308,5 +336,5 @@
#backlight.icon { #backlight.icon {
padding-right: 1px; padding-right: 1px;
font-size: 13px; font-size: 20px;
} }

View File

@ -213,14 +213,24 @@
extraConfig = { extraConfig = {
include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; }; include = { path = "${config.xdg.configHome}/macchiato.gitconfig"; };
init = { defaultBranch = "main"; }; init = { defaultBranch = "main"; };
pull = { ff = "only"; };
merge = { conflictStyle="zdiff3"; }; merge = { conflictStyle="zdiff3"; };
pull = { ff = "only"; };
push = { autoSetupRemote="true"; }; push = { autoSetupRemote="true"; };
"url \"git@github.com:\"" = { url = {
insteadOf = "https://github.com/"; "git@github.com" = {
insteadOf = "https://github.com/";
};
}; };
}; };
delta.enable = true; delta = {
enable = true;
navigate = true;
options = {
side-by-side = true;
hyperlinks = true;
};
};
}; };
programs = { programs = {

View File

@ -39,6 +39,8 @@ in
# May need to kill mako if nwg-panel starts it # May need to kill mako if nwg-panel starts it
"swaync" "swaync"
"keepassxc" "keepassxc"
"flatpak run org.signal.Signal"
"flatpak run com.slack.Slack"
# set gsettings # set gsettings
# "dconf write /org/gnome/desktop/interface/cursor-theme \"'catppuccin-macchiato-lavender-cursors'\"" # "dconf write /org/gnome/desktop/interface/cursor-theme \"'catppuccin-macchiato-lavender-cursors'\""
# "dconf write /org/gnome/desktop/interface/cursor-size 24" # "dconf write /org/gnome/desktop/interface/cursor-size 24"
@ -168,18 +170,25 @@ in
", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, 2560x1600@165, 0x0, 1.00'" ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, 2560x1600@165, 0x0, 1.00'"
]; ];
windowrulev2 = [ windowrulev2 = [
# float keepass windows, put main window in scratch # float keepass windows, put main window in scratch
"float, class:^(org.keepassxc.KeePassXC)$" "float, class:^(org.keepassxc.KeePassXC)$"
"workspace special:scratch silent, class:^(org.keepassxc.KeePassXC)$ title:\[Locked\]" "workspace special:scratch silent, class:^(org.keepassxc.KeePassXC)$"
"workspace special:scratch silent, class:^(org.signal.Signal)$"
# float music windows and move to music workspace # Firefox to workspace 2
# "tag +fmusic, class:^(firefox)$, title:^(YouTube — Mozilla Firefox)$" "workspace 2 silent, class:^(firefox)$"
# "float, tag:^(fmusic)$"# class:^(firefox)$, title:YouTube"
# "workspace special:music silent, tag:^(fmusic)$"# class:^(firefox)$, title:YouTube" # Slack to workspace 3
# "size 800 400, tag:^(fmusic)$"# class:^(firefox)$, title:YouTube" "workspace 3 silent, class:^(com.slack.Slack)$"
# "move 100%-w-20 100%-h-20, tag:^(fmusic)$"# class:^(firefox)$, title:YouTube"
# Zoom to workspace 4
"workspace 4 silent, class:^(zoom)$"
"fullscreen, class:^(zoom)$, title:^(Meeting)$"
# Float all other zoom windows (not meetings)
"float, class:^(zoom)$, title:!^(Meeting)$"
]; ];
monitor = [ monitor = [
"eDP-1, 2560x1600@165, 0x0, 1.00" "eDP-1, 2560x1600@165, 0x0, 1.00"
# At home monitor setup, 144 for hdmi bandwidth # At home monitor setup, 144 for hdmi bandwidth

View File

@ -251,7 +251,7 @@ in
# Fine-grained power management. Turns off GPU when not in use. # Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer). # Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = false; powerManagement.finegrained = true;
# Use the NVidia open source kernel module (not to be confused with the # Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver). # independent third-party "nouveau" open source driver).

View File

@ -0,0 +1,78 @@
{ config, lib, pkgs, inputs ? null, ... }:
with lib;
let
cfg = config.power_manager;
in
{
options.power_manager = {
enable = mkEnableOption "power management with auto-cpufreq";
useFlake = mkOption {
type = types.bool;
default = true;
description = ''
Whether to use the auto-cpufreq flake input for the latest version.
If false, uses the nixpkgs version (may be outdated).
'';
};
settings = mkOption {
type = types.attrs;
default = {
battery = {
governor = "powersave";
turbo = "never";
};
charger = {
governor = "performance";
turbo = "auto";
};
};
description = "Auto-cpufreq configuration settings";
};
enableThermald = mkOption {
type = types.bool;
default = true;
description = "Enable thermald for Intel CPU thermal management";
};
enableUpower = mkOption {
type = types.bool;
default = true;
description = "Enable UPower for battery monitoring";
};
};
config = mkIf cfg.enable {
# Auto-cpufreq configuration - use flake version if available, otherwise nixpkgs
programs.auto-cpufreq = mkIf (cfg.useFlake && inputs ? auto-cpufreq) {
enable = true;
settings = cfg.settings;
};
services.auto-cpufreq = mkIf (!cfg.useFlake || !(inputs ? auto-cpufreq)) {
enable = true;
settings = cfg.settings;
};
# Supporting services
services.upower.enable = mkIf cfg.enableUpower true;
services.thermald.enable = mkIf cfg.enableThermald true;
powerManagement.enable = mkIf cfg.enable true;
# Disable conflicting power management services
services.tlp.enable = mkForce false;
services.power-profiles-daemon.enable = mkForce false;
powerManagement.powertop.enable = mkForce false;
# Don't set a static CPU governor (let auto-cpufreq handle it)
powerManagement.cpuFreqGovernor = mkForce null;
};
# # Warning if flake input is missing when expected
# warnings = optional (cfg.useFlake && !(inputs ? auto-cpufreq))
# "power_manager: useFlake is enabled but auto-cpufreq flake input not found. Using nixpkgs version instead.";
}