From 36f2f5a102100e5d556e3ec2570215577e86b675 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 28 May 2023 15:12:46 +0100 Subject: [PATCH 1/3] Add tokyonight theme Add tokyonight theme to fish and bat (and by extension delta) Add extra zsh features --- home/Monarch/tux.nix | 12 +++++++----- home/Vanguard/xenia.nix | 5 +---- home/env/bat.nix | 10 +++++++++- home/env/fish.nix | 15 ++++++++++++++- home/env/zsh.nix | 12 ++++++++---- home/git/common.nix | 22 ++++++++++++++++++++-- 6 files changed, 59 insertions(+), 17 deletions(-) diff --git a/home/Monarch/tux.nix b/home/Monarch/tux.nix index d5d3d275..723e838a 100644 --- a/home/Monarch/tux.nix +++ b/home/Monarch/tux.nix @@ -16,9 +16,11 @@ home.packages = [pkgs.gcc]; - programs.zsh.shellAliases.update = "home-manager switch"; - programs.zsh.envExtra = '' - export CC=${pkgs.gcc}/bin/gcc - eval "$(/opt/homebrew/bin/brew shellenv)" - ''; + programs.zsh = { + shellAliases.update = "home-manager switch"; + sessionVariables.CC = "${pkgs.gcc}/bin/gcc"; + envExtra = '' + eval "$(/opt/homebrew/bin/brew shellenv)" + ''; + }; } diff --git a/home/Vanguard/xenia.nix b/home/Vanguard/xenia.nix index 1526d515..9db3bd8c 100644 --- a/home/Vanguard/xenia.nix +++ b/home/Vanguard/xenia.nix @@ -3,10 +3,7 @@ home.username = "xenia"; home.homeDirectory = "/home/xenia"; home.stateVersion = "22.11"; - home.packages = with pkgs; [ - prismlauncher - nomachine-client - ]; + home.packages = with pkgs; [prismlauncher nomachine-client]; programs.fish.shellAbbrs.hypr = "exec Hyprland"; xdg.configFile."hypr/hyprpaper.conf".text = '' diff --git a/home/env/bat.nix b/home/env/bat.nix index bc8f41c9..96cb1792 100644 --- a/home/env/bat.nix +++ b/home/env/bat.nix @@ -2,9 +2,17 @@ programs.bat = { enable = true; config = { - theme = "Catppuccin-macchiato"; + theme = "tokyonight"; }; themes = { + tokyonight = builtins.readFile (pkgs.fetchFromGitHub + { + owner = "folke"; + repo = "tokyonight.nvim"; + rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833"; + sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ="; + } + + "/extras/sublime/tokyonight_storm.tmTheme"); Catppuccin-macchiato = builtins.readFile (pkgs.fetchFromGitHub { owner = "catppuccin"; diff --git a/home/env/fish.nix b/home/env/fish.nix index c758d1f9..8439628f 100644 --- a/home/env/fish.nix +++ b/home/env/fish.nix @@ -1,10 +1,23 @@ -{...}: { +{pkgs, ...}: { programs.fish = { enable = true; shellAbbrs = { lg = "lazygit"; nixos-update = "sudo git -C /etc/nixos/config pull && sudo nixos-rebuild switch"; }; + plugins = [ + { + name = "tokyonight"; + src = + pkgs.fetchFromGitHub { + owner = "folke"; + repo = "tokyonight.nvim"; + rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833"; + sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ="; + } + + "/extras/fish/tokyonight_storm.fish"; + } + ]; }; programs.keychain.enableFishIntegration = true; programs.starship.enableFishIntegration = true; diff --git a/home/env/zsh.nix b/home/env/zsh.nix index cd94ea9d..7a7230ac 100644 --- a/home/env/zsh.nix +++ b/home/env/zsh.nix @@ -1,15 +1,19 @@ {config, ...}: { programs.zsh = { enable = true; + enableAutosuggestions = true; + enableCompletion = true; + enableSyntaxHighlighting = true; + enableVteIntegration = true; + autocd = true; + dotDir = ".config/zsh"; + historySubstringSearch.enable = true; shellAliases = { ll = "ls -l"; lg = "lazygit"; nixos-update = "sudo git -C /etc/nixos/config pull && sudo nixos-rebuild switch"; }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - }; + history.path = "${config.xdg.dataHome}/zsh/history"; }; programs.keychain.enableZshIntegration = true; programs.starship.enableZshIntegration = true; diff --git a/home/git/common.nix b/home/git/common.nix index c3ba232f..8399e877 100644 --- a/home/git/common.nix +++ b/home/git/common.nix @@ -1,10 +1,28 @@ -{...}: { +{pkgs, ...}: { + imports = [../env/bat.nix]; + xdg.configFile."git/tokyonight_storm.gitconfig".source = + pkgs.fetchFromGitHub + { + owner = "folke"; + repo = "tokyonight.nvim"; + rev = "cd5156f4b4a6c4c337a46deb0c0bd37319920833"; + sha256 = "/ht+ixR1eyYR0la00Xq5q1gCsgb5Ly90JghERwbaDPQ="; + } + + "/extras/delta/tokyonight_storm.gitconfig"; programs.git = { enable = true; userName = "Evie Litherland-Smith"; + includes = [{path = "tokyonight_storm.gitconfig";}]; delta = { enable = true; - options.syntax-theme = "Catppuccin-macchiato"; + options = { + blame-code-style = "syntax"; + line-numbers = true; + navigate = true; + side-by-side = true; + syntax-theme = "tokyonight"; + zero-style = "dim syntax"; + }; }; extraConfig = { pull.rebase = false; From 763e42fda96cdf8f92056e1ea04e51b10be814a6 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 28 May 2023 19:05:55 +0100 Subject: [PATCH 2/3] Add home-manager update shell abbr for fish --- home/Monarch/tux.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/Monarch/tux.nix b/home/Monarch/tux.nix index 723e838a..031acd66 100644 --- a/home/Monarch/tux.nix +++ b/home/Monarch/tux.nix @@ -16,6 +16,7 @@ home.packages = [pkgs.gcc]; + programs.fish.shellAbbrs.update = "home-manager switch"; programs.zsh = { shellAliases.update = "home-manager switch"; sessionVariables.CC = "${pkgs.gcc}/bin/gcc"; From fedcda2b6ad460394c8a9891059237f8822fc6d4 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 28 May 2023 19:18:03 +0100 Subject: [PATCH 3/3] Use git credential store method --- home/git/common.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/git/common.nix b/home/git/common.nix index 8399e877..a351ce16 100644 --- a/home/git/common.nix +++ b/home/git/common.nix @@ -27,6 +27,7 @@ extraConfig = { pull.rebase = false; init.defaultBranch = "main"; + credential.helper = "store"; }; }; }