From c19546a22529a128d240182e8b0aae2c3ff3a17b Mon Sep 17 00:00:00 2001 From: Alfie King Date: Thu, 8 Jan 2026 00:34:44 +0000 Subject: [PATCH] update --- components/catppuccin.nix | 10 ++ components/default.nix | 1 + components/waybar.nix | 82 ++++++++----- flake.lock | 37 +++++- flake.nix | 10 +- programs/fish.nix | 199 ++++++++++++++++++++++++++++++-- programs/unconfigured.nix | 6 +- system_components/default.nix | 1 + system_components/fish_root.nix | 2 +- system_components/fonts.nix | 7 ++ 10 files changed, 314 insertions(+), 41 deletions(-) create mode 100644 components/catppuccin.nix create mode 100644 system_components/fonts.nix diff --git a/components/catppuccin.nix b/components/catppuccin.nix new file mode 100644 index 0000000..5626a03 --- /dev/null +++ b/components/catppuccin.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: { + catppuccin = { + enable = true; + flavor = "mocha"; + accent = "mauve"; + + rofi.enable = true; + fish.enable = true; + }; +} \ No newline at end of file diff --git a/components/default.nix b/components/default.nix index c3dca7b..ffb56a8 100644 --- a/components/default.nix +++ b/components/default.nix @@ -3,5 +3,6 @@ ./hyprland ./utils.nix ./waybar.nix + ./catppuccin.nix ]; } \ No newline at end of file diff --git a/components/waybar.nix b/components/waybar.nix index 9ea586e..72a0ac0 100644 --- a/components/waybar.nix +++ b/components/waybar.nix @@ -3,32 +3,33 @@ enable = true; settings = { mainBar = { - "layer" = "top"; - "position" = "top"; - "mode" = "dock"; - "reload_style_on_change" = true; - "gtk-layer-shell" = true; + layer = "top"; + position = "top"; + mode = "dock"; + reload_style_on_change = true; + gtk-layer-shell = true; - "modules-left" = [ + modules-left = [ "hyprland/workspaces" ]; - "modules-center" = [ + modules-center = [ "clock" ]; - "modules-right" = [ + modules-right = [ "tray" + "pulseaudio" "battery" ]; - "tray" = { - "icon-size" = 12; - "spacing" = 4; + tray = { + icon-size = 12; + spacing = 4; }; "hyprland/workspaces" = { - "persistent-workspaces" = { + persistent-workspaces = { "1" = []; "2" = []; "3" = []; @@ -37,25 +38,36 @@ }; }; - # "clock" = { - # "format" = "{ =%m-%d %H =%M}"; - # }; - - "battery" = { - "states" = { - "warning" = 30; - "critical" = 15; + battery = { + states = { + warning = 30; + critical = 15; }; - "format" = "{icon} {capacity}%"; - "format-icons" = ["󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂"]; - "format-warning" = "󰁻 {capacity}%"; - "format-critical" = "󱃍 {capacity}%"; - "format-charging" = "󱘖 {capacity}%"; + format = "{icon} {capacity}%"; + format-icons = ["󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂"]; + format-warning = "󰁻 {capacity}%"; + format-critical = "󱃍 {capacity}%"; + format-charging = "󱘖 {capacity}%"; - "interval" = 1; - "min-length" = 6; - "max-length" = 6; + interval = 1; + min-length = 6; + max-length = 6; + }; + + pulseaudio = { + format = "{icon} {volume}%"; + format-muted = "󰝟 {volume}%"; + + format-icons = { + default = ["󰕿" "󰖀" "󰕾"]; + headphone = "󰋋"; + headset = "󰋋"; + }; + tooltip = true; + tooltip-format = "Device: {desc}"; + min-length = 6; + max-length = 6; }; }; }; @@ -129,6 +141,20 @@ padding: 0 4px; border-radius: 7px; } + + /* == Output Device == */ + + #pulseaudio { + background: #11111b; + padding: 0 8px; + border-radius: 7px; + } + + #pulseaudio:hover { + color: #c7a4de; + text-shadow: none; + box-shadow: none; + } "; }; } \ No newline at end of file diff --git a/flake.lock b/flake.lock index 68cc665..173df23 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1765990358, + "narHash": "sha256-l8x0gU8mnYaGMl+gWrsSHKBJlZWD8KXJfHTkRlFiPI0=", + "owner": "catppuccin", + "repo": "nix", + "rev": "de1b60ca45a578f59f7d84c8d338b346017b2161", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -37,6 +55,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1763966396, + "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1766902085, "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", @@ -54,9 +88,10 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "stable-nixpkgs": "stable-nixpkgs" } }, diff --git a/flake.nix b/flake.nix index ec687b9..2583548 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + catppuccin.url = "github:catppuccin/nix"; }; outputs = { @@ -16,6 +17,7 @@ stable-nixpkgs, home-manager, nixos-hardware, + catppuccin, ... } @ inputs: let system = "x86_64-linux"; @@ -34,9 +36,15 @@ modules = [ ./configuration.nix nixos-hardware.nixosModules.framework-13th-gen-intel + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager { - home-manager.users.toaster = ./home.nix; + home-manager.users.toaster = { + imports = [ + ./home.nix + catppuccin.homeModules.catppuccin + ]; + }; } ]; }; diff --git a/programs/fish.nix b/programs/fish.nix index d5b2695..151ce48 100644 --- a/programs/fish.nix +++ b/programs/fish.nix @@ -9,10 +9,6 @@ cd = "z"; cat = "bat"; }; - - # plugins = with pkgs.fishPlugins; [ - # tide - # ]; }; programs.zoxide = { @@ -25,11 +21,196 @@ enable = true; }; - # home.file.".config/mommy/config.sh".text = '' - # MOMMY_SWEETIE="toaster, boy" - # MOMMY_COLOR="lolcat" - # MOMMY_FORBIDDEN_WORDS="fat/," - # ''; + programs.starship = { + enable = true; + enableFishIntegration = true; + settings = { + format = "[](red)$os$username[](bg:peach fg:red)$directory[](bg:yellow fg:peach)$git_branch$git_status[](fg:yellow bg:green)$c$rust$golang$nodejs$php$java$kotlin$haskell$python[](fg:green bg:sapphire)$conda[](fg:sapphire bg:lavender)$time[ ](fg:lavender)$cmd_duration$line_break$character"; + right_format = "$custom"; + + custom.mommy = { + command = "${pkgs.mommy}/bin/mommy -1 -s $status"; + when = "true"; + }; + + palette = "catppuccin_mocha"; + os = { + disable = false; + style = "bg:red fg:crust"; + + symbols = { + NixOS = ""; + }; + }; + + username = { + show_always = true; + style_user = "bg:red fg:crust"; + style_root = "bg:red fg:crust"; + format = "[ $user]($style)"; + }; + + directory = { + style = "bg:peach fg:crust"; + format = "[ $path ]($style)"; + truncation_length = 3; + truncation_symbol = "…/"; + + substitutions = { + Documents = "󰈙 "; + Downloads = " "; + Music = "󰝚 "; + Pictures = " "; + Developer = "󰲋 "; + }; + }; + + git_branch = { + symbol = ""; + style = "bg:yellow"; + format = "[[ $symbol $branch ](fg:crust bg:yellow)]($style)"; + }; + + git_status = { + style = "bg:yellow"; + format = "[[($all_status$ahead_behind )](fg:crust bg:yellow)]($style)"; + }; + + nodejs = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + c = { + symbol = " "; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + rust = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + golang = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + php = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + java = { + symbol = " "; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + kotlin = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + haskell = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version) ](fg:crust bg:green)]($style)"; + }; + + python = { + symbol = ""; + style = "bg:green"; + format = "[[ $symbol( $version)(\\(#$virtualenv\\)) ](fg:crust bg:green)]($style)"; + }; + + docker_context = { + symbol = ""; + style = "bg:sapphire"; + format = "[[ $symbol( $context) ](fg:crust bg:sapphire)]($style)"; + }; + + conda = { + symbol = "  "; + style = "fg:crust bg:sapphire"; + format = "[$symbol$environment ]($style)"; + ignore_base = false; + }; + + time = { + disabled = false; + time_format = "%R"; + style = "bg:lavender"; + format = "[[  $time ](fg:crust bg:lavender)]($style)"; + }; + + line_break = { + disabled = true; + }; + + character = { + disabled = false; + success_symbol = "[❯](bold fg:green)"; + error_symbol = "[❯](bold fg:red)"; + vimcmd_symbol = "[❮](bold fg:green)"; + vimcmd_replace_one_symbol = "[❮](bold fg:lavender)"; + vimcmd_replace_symbol = "[❮](bold fg:lavender)"; + vimcmd_visual_symbol = "[❮](bold fg:yellow)"; + }; + + cmd_duration = { + show_milliseconds = true; + format = " in $duration "; + style = "bg:lavender"; + disabled = false; + show_notifications = true; + min_time_to_notify = 45000; + }; + + palettes = { + catppuccin_mocha = { + rosewater = "#f5e0dc"; + flamingo = "#f2cdcd"; + pink = "#f5c2e7"; + mauve = "#cba6f7"; + red = "#f38ba8"; + maroon = "#eba0ac"; + peach = "#fab387"; + yellow = "#f9e2af"; + green = "#a6e3a1"; + teal = "#94e2d5"; + sky = "#89dceb"; + sapphire = "#74c7ec"; + blue = "#89b4fa"; + lavender = "#b4befe"; + text = "#cdd6f4"; + subtext1 = "#bac2de"; + subtext0 = "#a6adc8"; + overlay2 = "#9399b2"; + overlay1 = "#7f849c"; + overlay0 = "#6c7086"; + surface2 = "#585b70"; + surface1 = "#45475a"; + surface0 = "#313244"; + base = "#1e1e2e"; + mantle = "#181825"; + crust = "#11111b"; + }; + }; + }; + }; + + home.file.".config/mommy/config.sh".text = '' + MOMMY_SWEETIE="toaster, boy" + MOMMY_COLOR="lolcat" + MOMMY_FORBIDDEN_WORDS="fat/," + ''; programs.kitty.shellIntegration.enableFishIntegration = true; } \ No newline at end of file diff --git a/programs/unconfigured.nix b/programs/unconfigured.nix index c548a58..c481c80 100644 --- a/programs/unconfigured.nix +++ b/programs/unconfigured.nix @@ -8,9 +8,13 @@ gimp kdePackages.dolphin blender - nerd-fonts._0xproto vesktop git vscode + cargo + rustc + gcc + cmake + python3 ]; } \ No newline at end of file diff --git a/system_components/default.nix b/system_components/default.nix index e157bdd..1ef2b73 100644 --- a/system_components/default.nix +++ b/system_components/default.nix @@ -4,5 +4,6 @@ ./sddm.nix ./hardware.nix ./tailscale.nix + ./fonts.nix ]; } \ No newline at end of file diff --git a/system_components/fish_root.nix b/system_components/fish_root.nix index 8c5c09b..dd104d4 100644 --- a/system_components/fish_root.nix +++ b/system_components/fish_root.nix @@ -7,7 +7,7 @@ fastfetch wget ]; - + programs.bash.interactiveShellInit = '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then diff --git a/system_components/fonts.nix b/system_components/fonts.nix new file mode 100644 index 0000000..afd5be8 --- /dev/null +++ b/system_components/fonts.nix @@ -0,0 +1,7 @@ +{ + pkgs, + lib, + ... +} : { + fonts.packages = builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); +} \ No newline at end of file