feat(zsh): show ASCII logo in a new terminal

This commit is contained in:
Oliver Davies 2023-08-11 19:55:56 +01:00
parent b7dca115ae
commit 577054a9e5
6 changed files with 30 additions and 9 deletions

View file

@ -11,8 +11,8 @@
system = "x86_64-linux"; system = "x86_64-linux";
username = "opdavies"; username = "opdavies";
nixos-system = import ./system/nixos { inherit inputs username; }; nixos-system = import ./system/nixos { inherit inputs self username; };
wsl-system = import ./system/wsl2 { inherit inputs system username; }; wsl-system = import ./system/wsl2 { inherit inputs self system username; };
in in
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];

13
logo.txt Normal file
View file

@ -0,0 +1,13 @@
⠀⠀⠀⠀⠀⠀⣀⣤⣤⣤⣤⣤⣤⣀⢀⣠⣤⡶⠾⠿⠿⠿⠷⣶⣤⣀⠀⠀⠀⠀
⠀⠀⠀⣠⣶⠟⠋⠉⠀⠀⢀⣤⣭⠝⠻⣶⣅⠀⠀⠀⡀⠀⠀⠀⠉⠻⣷⣄⠀⠀
⠀⠀⣾⡿⠀⠀⠀⢠⣴⣶⣾⣿⡄⠀⠀⢨⣿⣷⡿⠿⠿⢿⣷⣦⠀⠀⠈⢿⣦⠀
⠀⣾⠏⠀⠀⣠⡾⠟⠉⠉⠉⠉⠻⣷⣄⠹⣿⡁⠀⠀⠀⠀⠈⠹⣷⡀⠀⠈⣿⡄
⣸⡏⠀⠀⣰⡟⠁⠀⠀⠀⠀⠀⠀⠈⢻⣆⢻⣧⠀⠀⠀⠀⠀⠀⠸⣷⠀⠀⢸⣷
⣿⡇⠀⠀⣿⡃⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⢻⣇⠀⠀⠀⠀⠀⠀⣿⠀⠀⢸⣿
⢻⡇⠀⠀⢿⣇⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠀⠈⣿⣆⠀⠀⠀⢀⣼⡟⠀⠀⣼⡇
⠘⣿⡄⠀⠈⢻⣦⣀⠀⠀⠀⠀⣀⣴⠟⣿⡄⢠⣿⣿⣄⣤⣶⠟⠋⠀⢀⣴⡟⠀
⠀⠹⣿⡀⠀⠈⠙⠿⣿⣧⣼⣿⠿⠋⠀⠹⣧⢻⠋⠹⠟⠋⠉⠀⠀⣠⣼⠟⠁⠀
⠀⠀⠈⠻⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣶⢻⣧⠀⠀⢀⣀⣤⣶⠿⠋⠁⠀⠀⠀
⠀⠀⠀⠀⠈⠙⠻⠿⠶⣶⣶⠶⠿⠛⠋⠀⠀⢻⣷⠾⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀

View file

@ -1,4 +1,4 @@
{ inputs, username }: { inputs, self, username }:
{ desktop }: { desktop }:
@ -10,7 +10,7 @@ inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager = { home-manager = {
extraSpecialArgs = { inherit inputs desktop username; }; extraSpecialArgs = { inherit inputs desktop self username; };
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."${username}" = import ./home-manager.nix; users."${username}" = import ./home-manager.nix;

View file

@ -1,8 +1,8 @@
{ inputs, desktop, username, config, pkgs, ... }: { inputs, config, desktop, pkgs, self, username, ... }:
let let
desktop-config = import ./home-manager-desktop.nix { inherit config inputs pkgs; }; desktop-config = import ./home-manager-desktop.nix { inherit config inputs pkgs; };
shared-config = import ../shared/home-manager.nix { inherit inputs pkgs username; }; shared-config = import ../shared/home-manager.nix { inherit inputs pkgs self username; };
shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; }; shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; };
in in
{ {

View file

@ -1,4 +1,4 @@
{ inputs, pkgs, username }: { inputs, pkgs, self, username }:
let let
vim-astro = pkgs.vimUtils.buildVimPlugin { vim-astro = pkgs.vimUtils.buildVimPlugin {
@ -207,12 +207,20 @@ in
}; };
}; };
home.file."logo.txt" = {
source = pkgs.copyPathToStore "${self}/logo.txt";
target = "logo.txt";
};
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = false; enableCompletion = false;
dotDir = ".config/zsh"; dotDir = ".config/zsh";
initExtra = '' initExtra = ''
# Show the logo at the start of each prompt.
cat ~/logo.txt
# Plugins # Plugins
source "''${ZPLUG_REPOS}/robbyrussell/oh-my-zsh/plugins/git/git.plugin.zsh" source "''${ZPLUG_REPOS}/robbyrussell/oh-my-zsh/plugins/git/git.plugin.zsh"
source "''${ZPLUG_REPOS}/robbyrussell/oh-my-zsh/plugins/vi-mode/vi-mode.plugin.zsh" source "''${ZPLUG_REPOS}/robbyrussell/oh-my-zsh/plugins/vi-mode/vi-mode.plugin.zsh"

View file

@ -1,9 +1,9 @@
{ inputs, system, username }: { inputs, self, system, username }:
let let
pkgs = inputs.nixpkgs.legacyPackages."${system}"; pkgs = inputs.nixpkgs.legacyPackages."${system}";
shared-config = import ../shared/home-manager.nix { inherit inputs pkgs username; }; shared-config = import ../shared/home-manager.nix { inherit inputs pkgs self username; };
shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; }; shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; };
in in
inputs.home-manager.lib.homeManagerConfiguration { inputs.home-manager.lib.homeManagerConfiguration {