From 3505e611c18fc26d7ab30d7bf72eca429d21b2a9 Mon Sep 17 00:00:00 2001 From: Kabbone Date: Sat, 5 Oct 2024 10:32:00 +0200 Subject: [PATCH] desktop: enable catppuccin module --- flake.nix | 18 ++++++---- hosts/default.nix | 22 +++++++----- hosts/desktop/home.nix | 4 --- hosts/home.nix | 61 ++++++++++++++++++++++++++++------ hosts/lifebook/home.nix | 4 --- hosts/steamdeck/home.nix | 4 --- modules/programs/alacritty.nix | 1 + modules/services/dunst.nix | 1 + modules/shell/tmux.nix | 20 +++++------ modules/wm/sway/home.nix | 30 ++++++++++++++--- 10 files changed, 112 insertions(+), 53 deletions(-) diff --git a/flake.nix b/flake.nix index cd5a002..bb218d9 100644 --- a/flake.nix +++ b/flake.nix @@ -38,23 +38,27 @@ }; jovian-nixos = { - url = "github:Jovian-Experiments/Jovian-NixOS"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; + url = "github:Jovian-Experiments/Jovian-NixOS"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; }; lanzaboote = { - url = "github:nix-community/lanzaboote/master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + url = "github:nix-community/lanzaboote/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + catppuccin = { + url = "github:catppuccin/nix"; + }; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. + outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, catppuccin, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. rec { nixosConfigurations = ( # NixOS configurations import ./hosts { # Imports ./hosts/default.nix inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable agenix jovian-nixos microvm impermanence lanzaboote; # Also inherit home-manager so it does not need to be defined here. + inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable agenix jovian-nixos microvm impermanence lanzaboote catppuccin; # Also inherit home-manager so it does not need to be defined here. nix.allowedUsers = [ "@wheel" ]; security.sudo.execWheelOnly = true; } diff --git a/hosts/default.nix b/hosts/default.nix index c7fe8ef..0ae8bbf 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,7 +11,7 @@ # └─ ./home.nix # -{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, ... }: +{ lib, inputs, nixpkgs, nixpkgs-unstable, nixos-hardware, home-manager, home-manager-unstable, agenix, jovian-nixos, microvm, impermanence, lanzaboote, catppuccin, ... }: let user = "kabbone"; @@ -33,7 +33,7 @@ in { hades = lib.nixosSystem { # Desktop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote; }; + specialArgs = { inherit inputs user location nixos-hardware agenix microvm nixpkgs lanzaboote catppuccin; }; modules = [ agenix.nixosModules.default microvm.nixosModules.host @@ -45,12 +45,13 @@ in nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-pc-ssd + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user; }; + home-manager.extraSpecialArgs = { inherit user catppuccin; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./desktop/home.nix)]; }; @@ -60,7 +61,7 @@ in lifebook = lib.nixosSystem { # Laptop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote; }; + specialArgs = { inherit inputs user location nixos-hardware agenix lanzaboote catppuccin; }; modules = [ agenix.nixosModules.default lanzaboote.nixosModules.lanzaboote @@ -69,11 +70,12 @@ in ../modules/hardware/hydraCache.nix nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-pc-ssd + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user; }; + home-manager.extraSpecialArgs = { inherit user catppuccin; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./lifebook/home.nix)]; }; @@ -83,7 +85,7 @@ in nbf5 = lib.nixosSystem { # Laptop profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware agenix; }; + specialArgs = { inherit inputs user location nixos-hardware agenix catppuccin; }; modules = [ agenix.nixosModules.default ./nbf5 @@ -91,11 +93,12 @@ in ../modules/hardware/hydraCache.nix nixos-hardware.nixosModules.common-cpu-intel nixos-hardware.nixosModules.common-pc-ssd + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user; }; + home-manager.extraSpecialArgs = { inherit user catppuccin; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./nbf5/home.nix)]; }; @@ -105,7 +108,7 @@ in steamdeck = nixpkgs-unstable.lib.nixosSystem { # steamdeck profile inherit system; - specialArgs = { inherit inputs user location nixos-hardware agenix jovian-nixos lanzaboote; }; + specialArgs = { inherit inputs user location nixos-hardware agenix jovian-nixos lanzaboote catppuccin; }; modules = [ agenix.nixosModules.default jovian-nixos.nixosModules.default @@ -113,11 +116,12 @@ in ./steamdeck ./configuration_desktop.nix ../modules/hardware/hydraCache.nix + catppuccin.nixosModules.catppuccin home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user; }; + home-manager.extraSpecialArgs = { inherit user catppuccin; }; home-manager.users.${user} = { imports = [(import ./home.nix)] ++ [(import ./steamdeck/home.nix)]; }; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 27d6b91..665ede1 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -46,10 +46,6 @@ ]; }; - programs = { - alacritty.settings.font.size = 11; - }; - services = { # Applets blueman-applet.enable = true; # Bluetooth network-manager-applet.enable = true; # Network diff --git a/hosts/home.nix b/hosts/home.nix index e104b99..d0d406f 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -15,10 +15,12 @@ # └─ default.nix # -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, user, catppuccin, ... }: +#{ config, lib, pkgs, user, ... }: { - imports = # Home Manager Modules + imports = + [ catppuccin.homeManagerModules.catppuccin ] ++ (import ../modules/editors) ++ (import ../modules/programs) ++ (import ../modules/programs/configs) ++ @@ -92,8 +94,8 @@ #ms-python.python ms-vscode.cpptools dracula-theme.theme-dracula - catppuccin.catppuccin-vsc - catppuccin.catppuccin-vsc-icons + #catppuccin.catppuccin-vsc + #catppuccin.catppuccin-vsc-icons ]; }) @@ -103,17 +105,56 @@ ]; file.".config/wall".source = ../modules/themes/wall.jpg; file.".config/lockwall".source = ../modules/themes/lockwall.jpg; - pointerCursor = { # This will set cursor systemwide so applications can not choose their own - name = "Dracula-cursors"; - package = pkgs.dracula-theme; - size = 16; - gtk.enable = true; - }; +# pointerCursor = { # This will set cursor systemwide so applications can not choose their own +# name = "Dracula-cursors"; +# package = pkgs.dracula-theme; +# size = 16; +# gtk.enable = true; +# }; stateVersion = "23.05"; }; + catppuccin = { + enable = true; + accent = "lavender"; + flavor = "mocha"; + pointerCursor.enable = true; + }; + + gtk.catppuccin = { + enable = true; + accent = "lavender"; + flavor = "mocha"; + icon = { + enable = true; + accent = "lavender"; + flavor = "mocha"; + }; + }; + + qt.style.catppuccin = { + enable = true; + accent = "lavender"; + flavor = "mocha"; + apply = true; + }; + programs = { home-manager.enable = true; + alacritty = { + settings.font.size = 11; + catppuccin = { + enable = true; + flavor = "mocha"; + }; + }; + btop = { + catppuccin = { + enable = true; + flavor = "mocha"; + }; + }; + swaylock.catppuccin.enable = false; }; diff --git a/hosts/lifebook/home.nix b/hosts/lifebook/home.nix index d75f667..3d93848 100644 --- a/hosts/lifebook/home.nix +++ b/hosts/lifebook/home.nix @@ -43,10 +43,6 @@ ]; }; - programs = { - alacritty.settings.font.size = 11; - }; - services = { # Applets blueman-applet.enable = true; # Bluetooth network-manager-applet.enable = true; # Network diff --git a/hosts/steamdeck/home.nix b/hosts/steamdeck/home.nix index aa7b635..57ce4a9 100644 --- a/hosts/steamdeck/home.nix +++ b/hosts/steamdeck/home.nix @@ -43,10 +43,6 @@ ]; }; - programs = { - alacritty.settings.font.size = 11; - }; - services = { # Applets }; diff --git a/modules/programs/alacritty.nix b/modules/programs/alacritty.nix index 765b2f1..8f31b16 100644 --- a/modules/programs/alacritty.nix +++ b/modules/programs/alacritty.nix @@ -15,6 +15,7 @@ enable = true; package = pkgs.alacritty; settings = { + env.term = "screen-256color"; font = rec { # Font - Laptop has size manually changed at home.nix #normal.family = "FiraCode Nerd Font"; normal.family = "Cascadia Code"; diff --git a/modules/services/dunst.nix b/modules/services/dunst.nix index 608f0f3..25a4159 100644 --- a/modules/services/dunst.nix +++ b/modules/services/dunst.nix @@ -27,6 +27,7 @@ in services.dunst = { enable = true; + catppuccin.enable = true; settings = { global = { monitor = 0; diff --git a/modules/shell/tmux.nix b/modules/shell/tmux.nix index 78dcf9c..f559d0d 100644 --- a/modules/shell/tmux.nix +++ b/modules/shell/tmux.nix @@ -19,22 +19,22 @@ plugins = with pkgs.tmuxPlugins; [ yank sidebar - { +# { # plugin = dracula; # extraConfig = " # set -g @dracula-show-powerline true # set -g @dracula-plugins 'git cpu-usage ram-usage battery time' # set -g @dracula-border-contrast true # "; - plugin = catppuccin; - extraConfig = " - set -g @catppuccin_flavour 'macchiato' - set -g @catppuccin_window_tabs_enabled 'on' - set -g @catppuccin_host 'on' - set -g @catppuccin_user 'on' - set -g @catppuccin_date_time '%Y-%m-%d %H:%M' - "; - } +# plugin = catppuccin; +# extraConfig = " +# set -g @catppuccin_flavour 'macchiato' +# set -g @catppuccin_window_tabs_enabled 'on' +# set -g @catppuccin_host 'on' +# set -g @catppuccin_user 'on' +# set -g @catppuccin_date_time '%Y-%m-%d %H:%M' +# "; +# } ]; extraConfig = '' set -g mouse on diff --git a/modules/wm/sway/home.nix b/modules/wm/sway/home.nix index b6dd6a8..712514d 100644 --- a/modules/wm/sway/home.nix +++ b/modules/wm/sway/home.nix @@ -18,6 +18,7 @@ wayland.windowManager.sway = { enable = true; + catppuccin.enable = true; checkConfig = false; config = rec { menu = "${pkgs.rofi}/bin/rofi -show combi -show-icons"; @@ -90,9 +91,9 @@ startup = [ { command = "exec ${pkgs.rot8}/bin/rot8 -Y -k"; } { command = "xrdb -load ~/.Xresources"; } - { command = "gsettings set org.gnome.desktop.interface gtk-theme Arc"; } - { command = "gsettings set org.gnome.desktop.interface icon-theme ePapirus"; } - { command = "gsettings set org.gnome.desktop.interface cursor-theme Adwaita"; } + # { command = "gsettings set org.gnome.desktop.interface gtk-theme Dracula"; } + # { command = "gsettings set org.gnome.desktop.interface icon-theme Dracula"; } + # { command = "gsettings set org.gnome.desktop.interface cursor-theme Adwaita"; } #{ command = "exec ${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"; } { command = "${pkgs.thunderbird}/bin/thunderbird"; } { command = "${pkgs.firefox}/bin/firefox"; } @@ -246,7 +247,8 @@ export VDPAU_DRIVER="iHD"; export XDG_SESSION_TYPE="wayland"; export XDG_CURRENT_DESKTOP="sway"; - export QT_QPA_PLATFORMTHEME="wayland-egl"; + #export QT_QPA_PLATFORMTHEME="wayland-egl"; + export QT_QPA_PLATFORMTHEME="qt6ct"; export GST_VAAPI_ALL_DRIVERS="1"; export GTK_THEME="Arc"; export _JAVA_AWT_WM_NONREPARENTING="1"; @@ -290,7 +292,7 @@ pkgs.pinentry-rofi ]; terminal = "${pkgs.alacritty}/bin/alacritty"; - theme = "arthur"; + # theme = "arthur"; }; }; @@ -310,4 +312,22 @@ }; swayosd.enable = true; }; +# qt = { +# enable = true; +# style.package = [ +# pkgs.dracula-theme +# pkgs.dracula-icon-theme +# pkgs.catppuccin-kvantum +# pkgs.catppuccin-kde +# pkgs.catppuccin-gtk +# pkgs.qt6Packages.qtstyleplugin-kvantum +# ]; +# style.name = "kvantum"; +# platformTheme.name = "qtct"; +# }; +# xdg.configFile = { +# "Kvantum/Catppuccin".source = "${pkgs.catppuccin-kvantum}/share/Kvantum/Catppuccin-Frappe-Blue"; +# "Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Catppuccin-Frappe-Blue"; +# }; + }