From bf1af1f68a2b0597d0d3db70a85be07601c58837 Mon Sep 17 00:00:00 2001 From: Isshi0417 Date: Wed, 10 Jul 2024 20:18:11 +0900 Subject: [PATCH] Apply catppuccin theme --- flake.lock | 16 ++++++++ flake.nix | 7 +++- hosts/default/configuration.nix | 20 +++++++++- hosts/default/home.nix | 6 ++- modules/home-manager/catppuccin.nix | 57 +++++++++++++++++++++++++++ modules/home-manager/hyprland.nix | 9 +++++ modules/home-manager/shell/zsh.nix | 7 +++- modules/home-manager/vscode.nix | 14 +++++++ modules/nixos/alienware/alienware.nix | 1 - modules/nixos/alienware/hyprland.nix | 8 ---- 10 files changed, 131 insertions(+), 14 deletions(-) create mode 100644 modules/home-manager/catppuccin.nix create mode 100644 modules/home-manager/hyprland.nix create mode 100644 modules/home-manager/vscode.nix delete mode 100644 modules/nixos/alienware/hyprland.nix diff --git a/flake.lock b/flake.lock index f76e901..e44ce2d 100644 --- a/flake.lock +++ b/flake.lock @@ -135,6 +135,21 @@ "type": "github" } }, + "catppuccin": { + "locked": { + "lastModified": 1720472194, + "narHash": "sha256-CYscFEts6tyvosc1T29nxhzIYJAj/1CCEkV3ZMzSN/c=", + "owner": "catppuccin", + "repo": "nix", + "rev": "d75d5803852fb0833767dc969a4581ac13204e22", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -276,6 +291,7 @@ "root": { "inputs": { "aagl": "aagl", + "catppuccin": "catppuccin", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index 3aebebb..f38c20b 100644 --- a/flake.nix +++ b/flake.nix @@ -9,6 +9,8 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + catppuccin.url = "github:catppuccin/nix"; + stylix.url = "github:danth/stylix"; aagl = { @@ -31,9 +33,12 @@ # Home-manager inputs.home-manager.nixosModules.default + + # Catppuccin + inputs.catppuccin.nixosModules.catppuccin # Stylix - inputs.stylix.nixosModules.stylix + # inputs.stylix.nixosModules.stylix #Aagl inputs.aagl.nixosModules.default diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index a768db7..9fe18b3 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -18,7 +18,7 @@ # Stylix colors #../../modules/nixos/stylix/ghibli.nix - ../../modules/nixos/stylix/kuromi.nix + #../../modules/nixos/stylix/kuromi.nix #../../modules/nixos/stylix/dracula.nix ]; @@ -68,6 +68,17 @@ # Enable the X11 windowing system. services.xserver.enable = true; + # Enable Hyprland + nix.settings = { + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + # Enable the GNOME Desktop Environment. services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; @@ -122,6 +133,8 @@ }; }; + home-manager.backupFileExtension = "hm-backup"; + # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -143,6 +156,11 @@ lm_sensors ]; + catppuccin = { + enable = true; + flavor = "mocha"; + }; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/hosts/default/home.nix b/hosts/default/home.nix index c212121..0786673 100644 --- a/hosts/default/home.nix +++ b/hosts/default/home.nix @@ -5,7 +5,10 @@ [ ../../modules/home-manager/git.nix ../../modules/home-manager/shell/zsh.nix - ../../modules/home-manager/themes/basic-gtk.nix + ../../modules/home-manager/vscode.nix + #../../modules/home-manager/themes/basic-gtk.nix + ../../modules/home-manager/hyprland.nix + ../../modules/home-manager/catppuccin.nix ]; # Allow Unfree @@ -34,7 +37,6 @@ git gh kitty - vscode-fhs # School libreoffice-fresh diff --git a/modules/home-manager/catppuccin.nix b/modules/home-manager/catppuccin.nix new file mode 100644 index 0000000..a81fa3b --- /dev/null +++ b/modules/home-manager/catppuccin.nix @@ -0,0 +1,57 @@ +{ inputs, ... }: + +{ + imports = [ + inputs.catppuccin.homeManagerModules.catppuccin + ]; + + catppuccin = { + enable = true; + flavor = "mocha"; + + pointerCursor.enable = true; + }; + + gtk = { + enable = true; + + catppuccin = { + enable = true; + flavor = "mocha"; + gnomeShellTheme = true; + + icon = { + enable = true; + flavor = "mocha"; + }; + }; + }; + + programs.kitty.catppuccin.enable = true; + programs.kitty.catppuccin.flavor = "mocha"; + + programs.neovim.catppuccin.enable = true; + programs.neovim.catppuccin.flavor = "mocha"; + + programs.rofi.catppuccin.enable = true; + programs.rofi.catppuccin.flavor = "mocha"; + + programs.starship.catppuccin.enable = true; + programs.starship.catppuccin.flavor = "mocha"; + + programs.waybar.catppuccin.enable = true; + programs.waybar.catppuccin.flavor = "mocha"; + + programs.zsh.syntaxHighlighting.catppuccin.enable = true; + programs.zsh.syntaxHighlighting.catppuccin.flavor = "mocha"; + + qt.style.catppuccin.enable = true; + qt.style.catppuccin.accent = "mocha"; + qt.style.catppuccin.apply = true; + + services.mako.catppuccin.enable = true; + services.mako.catppuccin.flavor = "mocha"; + + wayland.windowManager.hyprland.catppuccin.enable = true; + wayland.windowManager.hyprland.catppuccin.flavor = "mocha"; +} \ No newline at end of file diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix new file mode 100644 index 0000000..b231616 --- /dev/null +++ b/modules/home-manager/hyprland.nix @@ -0,0 +1,9 @@ +{ config, pkgs, lib, ... }: + +{ + wayland.windowManager.hyprland = { + enable = true; + xwayland.enable = true; + systemd.enable = true; + }; +} \ No newline at end of file diff --git a/modules/home-manager/shell/zsh.nix b/modules/home-manager/shell/zsh.nix index 10f63ec..0fae00b 100644 --- a/modules/home-manager/shell/zsh.nix +++ b/modules/home-manager/shell/zsh.nix @@ -2,7 +2,7 @@ { imports = [ - ./themes/dracula.nix + #./themes/dracula.nix ]; # Download zsh packages @@ -27,4 +27,9 @@ ]; }; }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + }; } \ No newline at end of file diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix new file mode 100644 index 0000000..da128ce --- /dev/null +++ b/modules/home-manager/vscode.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: + +{ + programs.vscode = { + enable = true; + extensions = with pkgs.vscode-extensions; [ + bbenoist.nix + ms-python.python + ms-python.debugpy + catppuccin.catppuccin-vsc-icons + catppuccin.catppuccin-vsc + ]; + }; +} \ No newline at end of file diff --git a/modules/nixos/alienware/alienware.nix b/modules/nixos/alienware/alienware.nix index 2d5f3f1..2e8b5b4 100644 --- a/modules/nixos/alienware/alienware.nix +++ b/modules/nixos/alienware/alienware.nix @@ -7,7 +7,6 @@ ./hardware/ssd/ssd.nix ./gaming.nix ./nh.nix - ./hyprland.nix ]; swapDevices = [{ diff --git a/modules/nixos/alienware/hyprland.nix b/modules/nixos/alienware/hyprland.nix deleted file mode 100644 index 995014c..0000000 --- a/modules/nixos/alienware/hyprland.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: - -{ - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; -} \ No newline at end of file