From dfa13bd6e0896f700e1eea174d3b84bb7ca13a22 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Fri, 6 Sep 2024 12:42:22 +0200 Subject: [PATCH] add catppuccin's nix module --- flake.lock | 259 ++---------------------------------- flake.nix | 17 ++- home/base/gnome/default.nix | 8 ++ hosts/common/default.nix | 2 +- hosts/common/stylix.nix | 38 ------ hosts/common/theme.nix | 7 + 6 files changed, 35 insertions(+), 296 deletions(-) delete mode 100644 hosts/common/stylix.nix create mode 100644 hosts/common/theme.nix diff --git a/flake.lock b/flake.lock index 173b319..57b3da5 100644 --- a/flake.lock +++ b/flake.lock @@ -1,116 +1,17 @@ { "nodes": { - "base16": { - "inputs": { - "fromYaml": "fromYaml" - }, + "catppuccin": { "locked": { - "lastModified": 1708890466, - "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "665b3c6748534eb766c777298721cece9453fdae", + "lastModified": 1725509983, + "narHash": "sha256-NHCgHVqumPraFJnLrkanoLDuhOoUHUvRhvp/RIHJR+A=", + "owner": "catppuccin", + "repo": "nix", + "rev": "45745fe5960acaefef2b60f3455bcac6a0ca6bc9", "type": "github" }, "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "base16-fish": { - "flake": false, - "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", - "owner": "tomyun", - "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", - "type": "github" - }, - "original": { - "owner": "tomyun", - "repo": "base16-fish", - "type": "github" - } - }, - "base16-foot": { - "flake": false, - "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", - "owner": "tinted-theming", - "repo": "base16-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-foot", - "type": "github" - } - }, - "base16-helix": { - "flake": false, - "locked": { - "lastModified": 1720809814, - "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", - "owner": "tinted-theming", - "repo": "base16-helix", - "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-helix", - "type": "github" - } - }, - "base16-kitty": { - "flake": false, - "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", - "owner": "kdrag0n", - "repo": "base16-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", - "type": "github" - }, - "original": { - "owner": "kdrag0n", - "repo": "base16-kitty", - "type": "github" - } - }, - "base16-tmux": { - "flake": false, - "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", - "owner": "tinted-theming", - "repo": "base16-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-tmux", - "type": "github" - } - }, - "base16-vim": { - "flake": false, - "locked": { - "lastModified": 1716150083, - "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", - "owner": "tinted-theming", - "repo": "base16-vim", - "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-vim", + "owner": "catppuccin", + "repo": "nix", "type": "github" } }, @@ -149,22 +50,6 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -206,28 +91,7 @@ }, "flake-utils_2": { "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -260,22 +124,6 @@ "type": "github" } }, - "fromYaml": { - "flake": false, - "locked": { - "lastModified": 1689549921, - "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", - "owner": "SenchoPens", - "repo": "fromYaml", - "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "fromYaml", - "type": "github" - } - }, "git-hooks": { "inputs": { "flake-compat": [ @@ -328,23 +176,6 @@ "type": "github" } }, - "gnome-shell": { - "flake": false, - "locked": { - "lastModified": 1713702291, - "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", - "owner": "GNOME", - "repo": "gnome-shell", - "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", - "type": "github" - }, - "original": { - "owner": "GNOME", - "ref": "46.1", - "repo": "gnome-shell", - "type": "github" - } - }, "harfbuzz": { "flake": false, "locked": { @@ -403,27 +234,6 @@ "type": "github" } }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1724435763, - "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "libpng": { "flake": false, "locked": { @@ -561,13 +371,13 @@ }, "root": { "inputs": { + "catppuccin": "catppuccin", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixvim": "nixvim", "shells": "shells", "sops-nix": "sops-nix", - "stylix": "stylix", "wezterm": "wezterm" } }, @@ -630,38 +440,6 @@ "type": "github" } }, - "stylix": { - "inputs": { - "base16": "base16", - "base16-fish": "base16-fish", - "base16-foot": "base16-foot", - "base16-helix": "base16-helix", - "base16-kitty": "base16-kitty", - "base16-tmux": "base16-tmux", - "base16-vim": "base16-vim", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", - "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems_2" - }, - "locked": { - "lastModified": 1725290973, - "narHash": "sha256-+jwXF9KI0HfvDgpsoJGvOdfOGGSKOrID1wQB79zjUbo=", - "owner": "danth", - "repo": "stylix", - "rev": "ef81ad9e85e60420cc83d4642619c14b57139d33", - "type": "github" - }, - "original": { - "owner": "danth", - "repo": "stylix", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -692,21 +470,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -730,7 +493,7 @@ }, "wezterm": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "freetype2": "freetype2", "harfbuzz": "harfbuzz", "libpng": "libpng", diff --git a/flake.nix b/flake.nix index 2fc12e7..ab9c5dc 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,6 @@ description = "nezia's nixos configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; @@ -11,6 +10,7 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + catppuccin.url = "github:catppuccin/nix"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -19,10 +19,6 @@ url = "path:shells"; inputs.nixpkgs.follows = "nixpkgs"; }; - stylix = { - url = "github:danth/stylix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; wezterm = { url = "github:wez/wezterm/main?dir=nix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -30,7 +26,7 @@ nixos-hardware.url = "github:NixOS/nixos-hardware"; }; - outputs = { nixpkgs, nixos-hardware, home-manager, nixvim, sops-nix, stylix, ... }@inputs: + outputs = { nixpkgs, nixos-hardware, home-manager, nixvim, sops-nix, catppuccin, ... }@inputs: let username = "nezia"; system = "x86_64-linux"; @@ -40,13 +36,16 @@ ./hosts/common ./hosts/${hostname} - sops-nix.nixosModules.sops - stylix.nixosModules.stylix + sops-nix.nixosModules.sops + catppuccin.nixosModules.catppuccin home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.sharedModules = [ nixvim.homeManagerModules.nixvim ]; + home-manager.sharedModules = [ + catppuccin.homeManagerModules.catppuccin + nixvim.homeManagerModules.nixvim + ]; home-manager.extraSpecialArgs = { inherit inputs; }; } { _module.args = { inherit hostname username; }; } diff --git a/home/base/gnome/default.nix b/home/base/gnome/default.nix index bf16521..1fa00d6 100644 --- a/home/base/gnome/default.nix +++ b/home/base/gnome/default.nix @@ -17,5 +17,13 @@ home.packages = with pkgs.gnomeExtensions; [ appindicator ]; + gtk = { + enable = true; + catppuccin = { + enable = true; + flavor = "frappe"; + gnomeShellTheme = true; + }; + }; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index e7a15b4..d01731a 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -4,7 +4,7 @@ ./system ./syncthing ./sops.nix - ./stylix.nix + ./theme.nix ]; modules.gnome.enable = true; } diff --git a/hosts/common/stylix.nix b/hosts/common/stylix.nix deleted file mode 100644 index a6e7eb7..0000000 --- a/hosts/common/stylix.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, lib, ... }: - -{ - stylix.enable = true; - stylix.polarity = "dark"; - stylix.image = lib.mkDefault ../../wallpapers/nix-wallpaper-nineish-catppuccin-frappe.svg; - stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-frappe.yaml"; - stylix.autoEnable = true; - - stylix.cursor = { - name = "Adwaita"; - package = pkgs.adwaita-icon-theme; - size = 24; - }; - stylix.fonts = { - serif = { - package = pkgs.noto-fonts; - name = "Noto Serif"; - }; - sansSerif = { - package = pkgs.noto-fonts; - name = "Noto Sans"; - }; - monospace = { - package = pkgs.intel-one-mono; - name = "Intel One Mono"; - }; - emoji = { - package = pkgs.noto-fonts-color-emoji; - name = "Noto Color Emoji"; - }; - sizes = { - terminal = 14; - applications = 11; - desktop = 10; - }; - }; -} diff --git a/hosts/common/theme.nix b/hosts/common/theme.nix new file mode 100644 index 0000000..e89b2a0 --- /dev/null +++ b/hosts/common/theme.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + catppuccin = { + enable = true; + flavor = "frappe"; + }; +}