diff --git a/_sources/generated.json b/_sources/generated.json index eec4b86..4ac6468 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -299,6 +299,26 @@ }, "version": "5e36ca599f4aa41bdd87fbf2c5aae4397ac55074" }, + "palette": { + "cargoLocks": null, + "date": "2024-01-02", + "extract": null, + "name": "palette", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "catppuccin", + "repo": "palette", + "rev": "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb", + "sha256": "sha256-W1Bj/407i2XT7CmCBoFe2PCe10MB8lmnEQsWXSrJ6zg=", + "type": "github" + }, + "version": "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb" + }, "polybar": { "cargoLocks": null, "date": "2022-10-05", diff --git a/_sources/generated.nix b/_sources/generated.nix index 38c6708..4dabf8a 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -181,6 +181,18 @@ }; date = "2023-12-31"; }; + palette = { + pname = "palette"; + version = "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb"; + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "palette"; + rev = "7f103c3e11f7f705ee1fb8ac430d90a798bbdfcb"; + fetchSubmodules = false; + sha256 = "sha256-W1Bj/407i2XT7CmCBoFe2PCe10MB8lmnEQsWXSrJ6zg="; + }; + date = "2024-01-02"; + }; polybar = { pname = "polybar"; version = "9ee66f83335404186ce979bac32fcf3cd047396a"; diff --git a/modules/nixos/console.nix b/modules/nixos/console.nix new file mode 100644 index 0000000..800645a --- /dev/null +++ b/modules/nixos/console.nix @@ -0,0 +1,38 @@ +{ config +, lib +, sources +, ... +}: +let + cfg = config.console.catppuccin; + enable = cfg.enable && config.console.enable; + palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; +in +{ + options.console.catppuccin = + lib.ctp.mkCatppuccinOpt "console"; + + config.console.colors = lib.mkIf enable ( + # Manually populate with colors from catppuccin/tty + # Make sure to strip initial # from hex codes + map (color: (builtins.substring 1 6 palette.${color}.hex)) [ + "base" + "red" + "green" + "yellow" + "blue" + "pink" + "teal" + "subtext1" + + "surface2" + "red" + "green" + "yellow" + "blue" + "pink" + "teal" + "subtext0" + ] + ); +} diff --git a/nvfetcher.toml b/nvfetcher.toml index c8201e8..b5007bc 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -58,6 +58,10 @@ fetch.github = "catppuccin/micro" src.git = "https://github.com/catppuccin/nvim.git" fetch.github = "catppuccin/nvim" +[palette] +src.git = "https://github.com/catppuccin/palette" +fetch.github = "catppuccin/palette" + [polybar] src.git = "https://github.com/catppuccin/polybar.git" fetch.github = "catppuccin/polybar" diff --git a/test.nix b/test.nix index 57f8bf4..a9e5916 100644 --- a/test.nix +++ b/test.nix @@ -28,6 +28,8 @@ in boot.loader.grub = ctpEnable; + console = ctpEnable; + programs.dconf.enable = true; # required for gtk virtualisation = {