feat(home-manager): add starship theme
This commit is contained in:
parent
f79d1ecee9
commit
fa2b78afa3
5 changed files with 33 additions and 11 deletions
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
description = "Soothing pastel theme for Nix";
|
||||
inputs = {};
|
||||
outputs = { self }: {
|
||||
nixosModules.default = import ./nixos;
|
||||
homeManagerModules.default = import ./home-manager;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.programs.bat.catppuccin; in
|
||||
{
|
||||
options.programs.bat.catppuccin = {
|
||||
enable = lib.mkEnableOption "Catppuccin";
|
||||
enable = lib.mkEnableOption "Catppuccin theme";
|
||||
flavour = lib.mkOption {
|
||||
type = lib.types.enum [ "latte" "frappe" "macchiato" "mocha" ];
|
||||
default = config.catppuccin.flavour;
|
||||
|
@ -8,13 +10,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
cfg = config.programs.bat.catppuccin;
|
||||
in
|
||||
{
|
||||
home.activation = {
|
||||
batCache = "${pkgs.bat}/bin/bat cache --build";
|
||||
};
|
||||
config = {
|
||||
home.activation.batCache = "${pkgs.bat}/bin/bat cache --build";
|
||||
|
||||
programs.bat = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [
|
||||
./bat.nix
|
||||
./starship.nix
|
||||
];
|
||||
options.catppuccin = {
|
||||
flavour = lib.mkOption {
|
||||
|
|
25
home-manager/starship.nix
Normal file
25
home-manager/starship.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let cfg = config.programs.starship.catppuccin; in
|
||||
{
|
||||
options.programs.starship.catppuccin = {
|
||||
enable = lib.mkEnableOption "Catppuccin theme";
|
||||
flavour = lib.mkOption {
|
||||
type = lib.types.enum [ "latte" "frappe" "macchiato" "mocha" ];
|
||||
default = config.catppuccin.flavour;
|
||||
description = "Catppuccin flavour for starship";
|
||||
};
|
||||
};
|
||||
|
||||
config.programs.starship.settings = lib.mkIf cfg.enable
|
||||
({
|
||||
format = lib.mkDefault "$all";
|
||||
palette = "catppuccin_${cfg.flavour}";
|
||||
} // builtins.fromTOML (builtins.readFile
|
||||
(pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "starship";
|
||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc";
|
||||
sha256 = "sha256-soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
||||
} + /palettes/${cfg.flavour}.toml)));
|
||||
}
|
|
@ -1 +1 @@
|
|||
{ pkgs, lib, ... }: {}
|
||||
{ pkgs, lib, ... }: { }
|
||||
|
|
Loading…
Reference in a new issue