Swap tokyonight theme for catppuccin

Move bat expression to separate file to be imported by git (for delta
syntax highlighting)
Move gitui from tui/default.nix to git/default.nix
This commit is contained in:
Evie Litherland-Smith 2023-09-07 08:48:42 +01:00
parent 14b6fee478
commit f58fe209d8
9 changed files with 194 additions and 80 deletions

View file

@ -21,6 +21,102 @@
"type": "github"
}
},
"catppuccin-alacritty": {
"flake": false,
"locked": {
"lastModified": 1664239314,
"narHash": "sha256-w9XVtEe7TqzxxGUCDUR9BFkzLZjG8XrplXJ3lX6f+x0=",
"owner": "catppuccin",
"repo": "alacritty",
"rev": "3c808cbb4f9c87be43ba5241bc57373c793d2f17",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "alacritty",
"type": "github"
}
},
"catppuccin-bat": {
"flake": false,
"locked": {
"lastModified": 1668065083,
"narHash": "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=",
"owner": "catppuccin",
"repo": "bat",
"rev": "ba4d16880d63e656acced2b7d4e034e4a93f74b1",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "bat",
"type": "github"
}
},
"catppuccin-fish": {
"flake": false,
"locked": {
"lastModified": 1682585691,
"narHash": "sha256-l9V7YMfJWhKDL65dNbxaddhaM6GJ0CFZ6z+4R6MJwBA=",
"owner": "catppuccin",
"repo": "fish",
"rev": "91e6d6721362be05a5c62e235ed8517d90c567c9",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "fish",
"type": "github"
}
},
"catppuccin-gitui": {
"flake": false,
"locked": {
"lastModified": 1687370019,
"narHash": "sha256-m6Tjch6A2ZPZ3/muvb/9sEAQUZfjnWqcwyhNVeqPS2c=",
"owner": "catppuccin",
"repo": "gitui",
"rev": "3c97c7af7247b1e0f4366a4d8fab650bcce54100",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "gitui",
"type": "github"
}
},
"catppuccin-zathura": {
"flake": false,
"locked": {
"lastModified": 1664239314,
"narHash": "sha256-5Vh2bVabuBluVCJm9vfdnjnk32CtsK7wGIWM5+XnacM=",
"owner": "catppuccin",
"repo": "zathura",
"rev": "d85d8750acd0b0247aa10e0653998180391110a4",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "zathura",
"type": "github"
}
},
"catppuccin-zsh": {
"flake": false,
"locked": {
"lastModified": 1665638423,
"narHash": "sha256-Q7KmwUd9fblprL55W0Sf4g7lRcemnhjh4/v+TacJSfo=",
"owner": "catppuccin",
"repo": "zsh-syntax-highlighting",
"rev": "06d519c20798f0ebe275fc3a8101841faaeee8ea",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "zsh-syntax-highlighting",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -125,29 +221,18 @@
"root": {
"inputs": {
"anyrun": "anyrun",
"catppuccin-alacritty": "catppuccin-alacritty",
"catppuccin-bat": "catppuccin-bat",
"catppuccin-fish": "catppuccin-fish",
"catppuccin-gitui": "catppuccin-gitui",
"catppuccin-zathura": "catppuccin-zathura",
"catppuccin-zsh": "catppuccin-zsh",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs",
"tokyonight": "tokyonight",
"wallpapers": "wallpapers"
}
},
"tokyonight": {
"flake": false,
"locked": {
"lastModified": 1689285710,
"narHash": "sha256-x26qLaZzg7sJIc1d/5Q/DJ/YvRSc3s87PwPHTPTl+Xk=",
"owner": "folke",
"repo": "tokyonight.nvim",
"rev": "1ee11019f8a81dac989ae1db1a013e3d582e2033",
"type": "github"
},
"original": {
"owner": "folke",
"repo": "tokyonight.nvim",
"type": "github"
}
},
"wallpapers": {
"locked": {
"lastModified": 1687523055,

View file

@ -16,15 +16,44 @@
inputs.nixpkgs.follows = "nixpkgs";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
tokyonight = {
url = "github:folke/tokyonight.nvim";
catppuccin-alacritty = {
url = "github:catppuccin/alacritty";
flake = false;
};
catppuccin-bat = {
url = "github:catppuccin/bat";
flake = false;
};
catppuccin-fish = {
url = "github:catppuccin/fish";
flake = false;
};
catppuccin-gitui = {
url = "github:catppuccin/gitui";
flake = false;
};
catppuccin-zathura = {
url = "github:catppuccin/zathura";
flake = false;
};
catppuccin-zsh = {
url = "github:catppuccin/zsh-syntax-highlighting";
flake = false;
};
};
outputs =
{ self, nixpkgs, home-manager, hyprland, anyrun, wallpapers, tokyonight, }:
inputs@{ self, nixpkgs, home-manager, hyprland, anyrun, wallpapers, ... }:
let
catppuccin-themes = with inputs; {
alacritty = "${catppuccin-alacritty}/catppuccin-mocha.yml";
bat = "${catppuccin-bat}/Catppuccin-mocha.tmTheme";
fish = "${catppuccin-fish}/themes/Catppuccin Mocha.theme";
gitui = "${catppuccin-gitui}/theme/mocha.ron";
zathura = "${catppuccin-zathura}/src/catppuccin-mocha";
zsh =
"${catppuccin-zsh}/themes/catppuccin_mocha-zsh-syntax-highlighting.zsh";
};
systemConfig =
{ hostName, user ? "xenia", system ? "x86_64-linux", shell ? "zsh" }:
let
@ -63,7 +92,7 @@
useUserPackages = true;
extraSpecialArgs = {
inherit hostName user shell hyprland anyrun wallpapers
tokyonight;
catppuccin-themes;
shellConfig = ./home/shell/${shell}.nix;
};
users.${user} = import ./hosts/${hostName}/home.nix;
@ -75,7 +104,8 @@
home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.${system};
extraSpecialArgs = {
inherit hostName user shell hyprland anyrun wallpapers tokyonight;
inherit hostName user shell hyprland anyrun wallpapers
catppuccin-themes;
shellConfig = ./home/shell/${shell}.nix;
};
modules = [ ./hosts/${hostName}/home.nix ];

View file

@ -1,11 +1,11 @@
{ pkgs, tokyonight, ... }:
{ pkgs, catppuccin-themes, ... }:
{
home.packages = [ (pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }) ];
programs.alacritty = {
enable = true;
settings = {
import = [ "${tokyonight}/extras/alacritty/tokyonight_night.yml" ];
import = [ catppuccin-themes.alacritty ];
window = {
dynamic_title = true;
decorations_theme_variant = "Dark";

View file

@ -1,26 +1,36 @@
{ lib, pkgs, tokyonight, ... }: {
xdg.configFile."git/tokyonight_night.gitconfig".source =
"${tokyonight}/extras/delta/tokyonight_night.gitconfig";
programs.git = {
enable = true;
package = pkgs.gitFull;
userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk";
includes = [{ path = "tokyonight_night.gitconfig"; }];
delta = {
{ lib, pkgs, catppuccin-themes, ... }: {
imports = [ ../tui/bat.nix ];
programs = {
git = {
enable = true;
options = {
blame-code-style = "syntax";
line-numbers = true;
navigate = true;
side-by-side = true;
syntax-theme = "tokyonight";
zero-style = "dim syntax";
package = pkgs.gitFull;
userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk";
delta = {
enable = true;
options = {
blame-code-style = "syntax";
line-numbers = true;
navigate = true;
side-by-side = true;
syntax-theme = "Catppuccin";
zero-style = "dim syntax";
};
};
extraConfig = {
pull.rebase = false;
init.defaultBranch = "main";
};
};
extraConfig = {
pull.rebase = false;
init.defaultBranch = "main";
gitui = {
enable = true;
keyConfig = builtins.readFile (pkgs.fetchFromGitHub {
owner = "extrawurst";
repo = "gitui";
rev = "8f7f35b8a97e38a0e181032285554cd0961d588e";
sha256 = "sha256-zJDf6WhaUe8QTPCoVAdfCdUvYEcQpm2qddQiKw41kjY=";
} + "/vim_style_key_config.ron");
theme = builtins.readFile catppuccin-themes.gitui;
};
};
}

View file

@ -1,15 +1,9 @@
{tokyonight, ...}: {
imports = [./default.nix];
{ ... }:
{
imports = [ ./default.nix ];
programs = {
fish = {
enable = true;
plugins = [
{
name = "tokyonight";
src = "${tokyonight}/extras/fish/tokyonight_night.fish";
}
];
};
fish.enable = true;
fzf.enableFishIntegration = true;
keychain.enableFishIntegration = true;
starship.enableFishIntegration = true;

View file

@ -1,4 +1,4 @@
{ config, ... }: {
{ config, catppuccin-themes, ... }: {
imports = [ ./default.nix ];
programs = {
zsh = {
@ -11,6 +11,9 @@
dotDir = ".config/zsh";
historySubstringSearch.enable = true;
history.path = "${config.xdg.dataHome}/zsh/history";
initExtraFirst = ''
source ${catppuccin-themes.zsh}
'';
oh-my-zsh = {
enable = true;
plugins = [

9
home/tui/bat.nix Normal file
View file

@ -0,0 +1,9 @@
{ catppuccin-themes, ... }:
{
programs.bat = {
enable = true;
config.theme = "Catppuccin";
themes.Catppuccin = builtins.readFile catppuccin-themes.bat;
};
}

View file

@ -1,23 +1,7 @@
{ pkgs, tokyonight, ... }: {
{ pkgs, ... }:
{
home.packages = [ pkgs.pinentry ];
programs = {
bat = {
enable = true;
config.theme = "tokyonight";
themes.tokyonight = builtins.readFile
"${tokyonight}/extras/sublime/tokyonight_night.tmTheme";
};
gitui = {
enable = true;
keyConfig = builtins.readFile (pkgs.fetchFromGitHub {
owner = "extrawurst";
repo = "gitui";
rev = "8f7f35b8a97e38a0e181032285554cd0961d588e";
sha256 = "sha256-zJDf6WhaUe8QTPCoVAdfCdUvYEcQpm2qddQiKw41kjY=";
} + "/vim_style_key_config.ron");
theme =
builtins.readFile "${tokyonight}/extras/gitui/tokyonight_night.ron";
};
ncspot.enable = true;
};
imports = [ ./bat.nix ];
programs.ncspot.enable = true;
}

View file

@ -1,9 +1,8 @@
{ pkgs, tokyonight, ... }:
{ catppuccin-themes, ... }:
{
programs.zathura = {
enable = true;
extraConfig = builtins.readFile
"${tokyonight}/extras/zathura/tokyonight_night.zathurarc";
extraConfig = builtins.readFile catppuccin-themes.zathura;
};
}