diff --git a/flake.lock b/flake.lock index a8180ad..040c614 100644 --- a/flake.lock +++ b/flake.lock @@ -25,20 +25,18 @@ "type": "github" } }, - "base16-shell": { - "flake": false, + "catppuccin": { "locked": { - "lastModified": 1663053609, - "narHash": "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=", - "owner": "chriskempson", - "repo": "base16-shell", - "rev": "588691ba71b47e75793ed9edfcfaa058326a6f41", + "lastModified": 1722997334, + "narHash": "sha256-vE5FcKVQ3E0txJKt5w3vOlfcN1XoTAlxK9PnQ/CJavA=", + "owner": "catppuccin", + "repo": "nix", + "rev": "66f4ea170093b62f319f41cebd2337a51b225c5a", "type": "github" }, "original": { - "owner": "chriskempson", - "ref": "master", - "repo": "base16-shell", + "owner": "catppuccin", + "repo": "nix", "type": "github" } }, @@ -453,11 +451,11 @@ "nixvim": "nixvim_2" }, "locked": { - "lastModified": 1722962845, - "narHash": "sha256-5LVqc7VzjUyHNPg+s4h7+hpI3+PyxmTVxBHh0ZZlVdY=", + "lastModified": 1723417027, + "narHash": "sha256-7nHu9z9nl74cQxsKc/MqVJxP55Tp6st0BqQBRD0rcdw=", "owner": "alejandro-angulo", "repo": "nixvim-config", - "rev": "5b0724b2f9ac3ad19cdb7b0a40ffc80f5449094b", + "rev": "c2019dad461435c6e4f3c518355d9bf244f45ab2", "type": "github" }, "original": { @@ -535,7 +533,7 @@ "root": { "inputs": { "agenix": "agenix", - "base16-shell": "base16-shell", + "catppuccin": "catppuccin", "deploy-rs": "deploy-rs", "home-manager": "home-manager", "nixos-generators": "nixos-generators", diff --git a/flake.nix b/flake.nix index 3528ca3..5b396a0 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,8 @@ home-manager.url = "github:nix-community/home-manager/master"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + catppuccin.url = "github:catppuccin/nix"; + nixos-generators.url = "github:nix-community/nixos-generators"; nixos-generators.inputs.nixpkgs.follows = "nixpkgs"; @@ -28,9 +30,6 @@ nixvim.url = "github:alejandro-angulo/nixvim-config"; nixvim.inputs.nixpkgs.follows = "nixpkgs"; - base16-shell.url = "github:chriskempson/base16-shell/master"; - base16-shell.flake = false; - zsh-syntax-highlighting.url = "github:zsh-users/zsh-syntax-highlighting/master"; zsh-syntax-highlighting.flake = false; @@ -63,6 +62,8 @@ home-manager.nixosModules.home-manager ]; + homes.modules = with inputs; [catppuccin.homeManagerModules.catppuccin]; + deploy.nodes = { node = { hostname = "node"; diff --git a/modules/home/apps/bat/default.nix b/modules/home/apps/bat/default.nix index 76fb779..ebc0e64 100644 --- a/modules/home/apps/bat/default.nix +++ b/modules/home/apps/bat/default.nix @@ -15,7 +15,7 @@ in { config = mkIf cfg.enable { programs.bat = { enable = true; - config.theme = "gruvbox-dark"; + catppuccin.enable = true; }; }; } diff --git a/modules/home/apps/btop/default.nix b/modules/home/apps/btop/default.nix index 456b1c1..b239b3c 100644 --- a/modules/home/apps/btop/default.nix +++ b/modules/home/apps/btop/default.nix @@ -15,10 +15,10 @@ in { config = mkIf cfg.enable { programs.btop = { enable = true; + catppuccin.enable = true; settings = { theme_background = false; vim_keys = true; - color_theme = "gruvbox_dark_v2"; }; }; }; diff --git a/modules/home/apps/tmux/default.nix b/modules/home/apps/tmux/default.nix index 754e53c..1856ffa 100644 --- a/modules/home/apps/tmux/default.nix +++ b/modules/home/apps/tmux/default.nix @@ -16,10 +16,9 @@ in { }; config = lib.mkIf cfg.enable { - xdg.dataFile."tmux-theme".source = ./tmux_theme; - programs.tmux = { enable = true; + catppuccin.enable = true; keyMode = "vi"; newSession = true; sensibleOnTop = true; @@ -73,11 +72,6 @@ in { bind '"' split-window -c "#{pane_current_path}" bind % split-window -h -c "#{pane_current_path}" - # Eye Candy - # set -g @plugin 'mattdavis90/base16-tmux' - # set -g @colors-base16 'darktooth' - source-file ${config.xdg.dataHome}/tmux-theme; - # Smart pane switching with awareness of Vim splits. # See: https://github.com/christoomey/vim-tmux-navigator is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ diff --git a/modules/home/apps/tmux/tmux_theme b/modules/home/apps/tmux/tmux_theme deleted file mode 100644 index d625fd6..0000000 --- a/modules/home/apps/tmux/tmux_theme +++ /dev/null @@ -1,22 +0,0 @@ -# This tmux statusbar config was created by tmuxline.vim -# on Sun, 02 Apr 2023 -# Some modifications made by hand - -set -g status-justify "left" -set -g status "on" -set -g status-left-style "none" -set -g message-command-style "fg=#a89984,bg=#504945" -set -g status-right-style "none" -set -g pane-active-border-style "fg=#504945" -set -g status-style "none,bg=#32302f" -set -g message-style "fg=#a89984,bg=#504945" -set -g pane-border-style "fg=#32302f" -set -g status-right-length "100" -set -g status-left-length "100" -setw -g window-status-activity-style "none" -setw -g window-status-separator "" -setw -g window-status-style "none,fg=#928374,bg=#32302f" -set -g status-left "#[fg=#928374,bg=#32302f] #S #[fg=#32302f,bg=#32302f,nobold,nounderscore,noitalics]" -set -g status-right "#[fg=#32302f,bg=#32302f,nobold,nounderscore,noitalics]#[fg=#928374,bg=#32302f] %Y-%m-%d  %H:%M #[fg=#32302f,bg=#32302f,nobold,nounderscore,noitalics]#[fg=#928374,bg=#32302f] #h " -setw -g window-status-format "#[fg=#928374,bg=#32302f] #I )#[fg=#928374,bg=#32302f] #W " -setw -g window-status-current-format "#[fg=#32302f,bg=#504945,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#504945] #I #[fg=#a89984,bg=#504945] #W #[fg=#504945,bg=#32302f,nobold,nounderscore,noitalics]" diff --git a/modules/home/programs/k9s/default.nix b/modules/home/programs/k9s/default.nix new file mode 100644 index 0000000..c634b51 --- /dev/null +++ b/modules/home/programs/k9s/default.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + namespace, + ... +}: let + cfg = config.${namespace}.programs.k9s; +in { + options.${namespace}.programs.k9s = { + enable = lib.mkEnableOption "k9s"; + }; + + config = lib.mkIf cfg.enable { + programs.k9s = { + enable = true; + catppuccin = { + enable = true; + transparent = true; + }; + }; + }; +} diff --git a/modules/home/programs/kitty/default.nix b/modules/home/programs/kitty/default.nix index afb09c9..c3cd25b 100644 --- a/modules/home/programs/kitty/default.nix +++ b/modules/home/programs/kitty/default.nix @@ -16,6 +16,7 @@ in { config = mkIf cfg.enable { programs.kitty = { enable = true; + catppuccin.enable = true; font = { size = 12; package = pkgs.nerdfonts.override {fonts = ["Hack"];}; diff --git a/modules/home/programs/rofi/default.nix b/modules/home/programs/rofi/default.nix index f4c1617..e7e02ff 100644 --- a/modules/home/programs/rofi/default.nix +++ b/modules/home/programs/rofi/default.nix @@ -18,7 +18,7 @@ in { enable = true; # TODO: How to ensure this font is installed? font = "Hack Nerd Font 10"; - theme = "gruvbox-dark-hard"; + catppuccin.enable = true; plugins = [pkgs.rofi-emoji]; extraConfig = { show-icons = true; diff --git a/modules/home/programs/swaylock/default.nix b/modules/home/programs/swaylock/default.nix index 76c3e1d..79a911e 100644 --- a/modules/home/programs/swaylock/default.nix +++ b/modules/home/programs/swaylock/default.nix @@ -15,9 +15,7 @@ in { config = mkIf cfg.enable { programs.swaylock = { enable = true; - settings = { - image = "${config.xdg.dataHome}/${config.${namespace}.windowManagers.sway.wallpaperPath}"; - }; + catppuccin.enable = true; }; }; } diff --git a/modules/home/services/swaync/default.nix b/modules/home/services/swaync/default.nix index 72dc353..780d2ae 100644 --- a/modules/home/services/swaync/default.nix +++ b/modules/home/services/swaync/default.nix @@ -21,6 +21,7 @@ in { settings = { widgets = ["title" "dnd" "notifications" "mpris"]; }; + style = builtins.readFile "${pkgs.aa.catppuccin-swaync}/catppuccin.css"; }; }; } diff --git a/modules/home/tools/git/default.nix b/modules/home/tools/git/default.nix index 68e4a4a..41302ea 100644 --- a/modules/home/tools/git/default.nix +++ b/modules/home/tools/git/default.nix @@ -36,6 +36,7 @@ in { programs.git = { delta = { enable = true; + catppuccin.enable = true; options = { line-numbers = true; navigate = true; @@ -86,6 +87,7 @@ in { programs.lazygit = { enable = true; + catppuccin.enable = true; settings = { quitOnTopLevelReturn = true; gui.nerdFontsVersion = "3"; diff --git a/modules/home/tools/zsh/default.nix b/modules/home/tools/zsh/default.nix index a9fe070..64c7d3f 100644 --- a/modules/home/tools/zsh/default.nix +++ b/modules/home/tools/zsh/default.nix @@ -23,7 +23,6 @@ in { export EDITOR=nvim ''; initExtra = '' - base16_darktooth bindkey -v bindkey '^A' beginning-of-line bindkey '^E' end-of-line @@ -48,11 +47,6 @@ in { src = lib.cleanSource ./.; file = "p10k.zsh"; } - { - name = "base16-shell"; - src = inputs.base16-shell; - file = "base16-shell.plugin.zsh"; - } ]; }; }; diff --git a/modules/home/windowManagers/sway/default.nix b/modules/home/windowManagers/sway/default.nix index 5862391..ca0a935 100644 --- a/modules/home/windowManagers/sway/default.nix +++ b/modules/home/windowManagers/sway/default.nix @@ -65,11 +65,17 @@ in { xdg-utils ]; - home.pointerCursor = { - package = pkgs.catppuccin-cursors.mochaDark; - name = "catppuccin-mocha-dark-cursors"; - gtk.enable = true; - x11.enable = true; + catppuccin.pointerCursor = { + enable = true; + accent = "dark"; + }; + gtk.catppuccin = { + enable = true; + icon.enable = true; + }; + qt.style.catppuccin = { + enable = true; + apply = true; }; # For screen sharing to work @@ -86,6 +92,7 @@ in { checkConfig = false; enable = true; + catppuccin.enable = true; swaynag.enable = true; wrapperFeatures.gtk = true; # so that gtk works properly systemd.enable = true; # needed this for screen sharing to work @@ -94,27 +101,43 @@ in { inherit terminal menu left right up down modifier; workspaceAutoBackAndForth = true; + # Use catppuccin colors colors = { + background = "$base"; focused = { - border = "#2B3C44"; - background = "#4E3D45"; - text = "#FFFFFF"; - indicator = "#333333"; - childBorder = "#000000"; + border = "$lavender"; + background = "$base"; + text = "$text"; + indicator = "$rosewater"; + childBorder = "$lavender"; }; focusedInactive = { - border = "#484848"; - background = "#333333"; - text = "#FFFFFF"; - indicator = "#000000"; - childBorder = "#000000"; + border = "$overlay0"; + background = "$base"; + text = "$text"; + indicator = "$rosewater"; + childBorder = "$overlay0"; }; unfocused = { - border = "#484848"; - background = "#333333"; - text = "#FFFFFF"; - indicator = "#000000"; - childBorder = "#000000"; + border = "$overlay0"; + background = "$base"; + text = "$text"; + indicator = "$rosewater"; + childBorder = "$overlay0"; + }; + urgent = { + border = "$peach"; + background = "$base"; + text = "$peach"; + indicator = "$overlay0"; + childBorder = "$peach"; + }; + placeholder = { + border = "$overlay0"; + background = "$base"; + text = "$text"; + indicator = "$overlay0"; + childBorder = "$overlay0"; }; }; diff --git a/packages/catppuccin-swaync/default.nix b/packages/catppuccin-swaync/default.nix new file mode 100644 index 0000000..e5d38ad --- /dev/null +++ b/packages/catppuccin-swaync/default.nix @@ -0,0 +1,24 @@ +{ + stdenv, + flavor ? "mocha", + font ? "Hack Nerd Font", + fetchurl, + ... +}: +stdenv.mkDerivation rec { + pname = "catppuccin-swaync"; + version = "0.2.3"; + + src = fetchurl { + url = "https://github.com/catppuccin/swaync/releases/download/v${version}/${flavor}.css"; + hash = "sha256-Hie/vDt15nGCy4XWERGy1tUIecROw17GOoasT97kIfc="; + }; + + donBuild = true; + dontUnpack = true; + + installPhase = '' + mkdir -p "$out" + sed 's/Ubuntu Nerd Font/${font}/g' "$src" > "$out/catppuccin.css" + ''; +}