Kieran's opinionated (and probably slightly dumb) nix config

feat: add zsh config and make it the default shell

Changed files
+145 -2
home-manager
moonlark
+141
home-manager/home.nix
···
theme = spicePkgs.themes.catppuccin;
colorScheme = "macchiato";
};
+
+
programs.starship = {
+
enable = true;
+
enableZshIntegration = true;
+
# Configuration written to ~/.config/starship.toml
+
settings = {
+
add_newline = false;
+
+
# Change command timeout from 500 to 1000 ms
+
command_timeout = 1000;
+
+
format = lib.concatStrings [
+
"[](purple)$env_var"
+
"$all$character"
+
];
+
+
character = {
+
success_symbol = "[](bold green)";
+
error_symbol = "[](bold red)";
+
};
+
+
env_var.STARSHIP_DISTRO = {
+
format = "[$env_value](bold green)";
+
variable = "STARSHIP_DISTRO";
+
disabled = false;
+
};
+
+
username = {
+
style_user = "green";
+
style_root = "red";
+
format = "[$user]($style) ";
+
disabled = false;
+
show_always = true;
+
};
+
+
hostname = {
+
ssh_only = false;
+
format = "on [$hostname](bold yellow) ";
+
disabled = false;
+
};
+
+
directory = {
+
truncation_length = 1;
+
truncation_symbol = "…/";
+
home_symbol = " ~";
+
read_only_style = "197";
+
read_only = "  ";
+
format = "at [$path]($style)[$read_only]($read_only_style) ";
+
};
+
+
git_branch = {
+
symbol = "󰊢 ";
+
format = "via [$symbol$branch]($style) ";
+
truncation_length = 6;
+
truncation_symbol = "…/";
+
style = "bold green";
+
};
+
+
git_status = {
+
format = "[\($all_status$ahead_behind\)]($style) ";
+
style = "bold green";
+
conflicted = "🏳";
+
up_to_date = " ";
+
untracked = " ";
+
#ahead = "⇡";
+
diverged = "⇕⇡⇣";
+
#behind = "⇣";
+
stashed = " ";
+
modified = " ";
+
staged = "[++\($count\)](green)";
+
renamed = "襁 ";
+
deleted = " ";
+
};
+
+
docker_context = {
+
format = "via [ $context](bold blue) ";
+
disabled = false;
+
};
+
+
python = {
+
symbol = " ";
+
python_binary = "python3";
+
disabled = false;
+
};
+
+
nodejs = {
+
format = "via [ $version](bold green) ";
+
disabled = true;
+
};
+
+
ruby = {
+
format = "via [ $version]($style) ";
+
disabled = true;
+
};
+
};
+
};
+
+
programs.zsh = {
+
enable = true;
+
enableCompletion = true;
+
#autosuggestion.enable = true;
+
syntaxHighlighting.enable = true;
+
+
shellAliases = {
+
ll = "ls -l";
+
la = "ls -la";
+
update = "sudo nixos-rebuild switch";
+
};
+
history = {
+
size = 10000;
+
path = "${config.xdg.dataHome}/zsh/history";
+
};
+
+
oh-my-zsh = {
+
enable = true;
+
plugins = [ "git" "sudo" "docker" "git" "command-not-found" "colored-man-pages" ];
+
};
+
+
plugins = [
+
{
+
# will source zsh-autosuggestions.plugin.zsh
+
name = "zsh-autosuggestions";
+
src = pkgs.fetchFromGitHub {
+
owner = "zsh-users";
+
repo = "zsh-autosuggestions";
+
rev = "v0.7.0";
+
sha256 = "sha256-KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w=";
+
};
+
}
+
{
+
# will source zsh-sytax-highlighting
+
name = "zsh-sytax-highlighting";
+
src = pkgs.fetchFromGitHub {
+
owner = "zsh-users";
+
repo = "zsh-syntax-highlighting";
+
rev = "0.8.0";
+
sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo=";
+
};
+
}
+
];
+
};
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
+4 -2
moonlark/configuration.nix
···
pkgs.wpa_supplicant_gui
pkgs.alacritty
pkgs.zsh
+
pkgs.starship
pkgs.swww
pkgs.sunwait
pkgs.wluma
···
fonts.packages = with pkgs; [
nerdfonts
];
-
-
programs.hyprland.enable = true;
environment.sessionVariables = {
XDG_CACHE_HOME = "$HOME/.cache";
···
};
};
};
+
+
programs.zsh.enable = true;
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = {
kierank = {
···
# Be sure to change it (using passwd) after rebooting!
initialPassword = "lolzthisaintsecure!";
isNormalUser = true;
+
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzEEjvbL/ttqmYoDjxYQmDIq36BabROJoXgQKeh9liBxApwp+2PmgxROzTg42UrRc9pyrkq5kVfxG5hvkqCinhL1fMiowCSEs2L2/Cwi40g5ZU+QwdcwI8a4969kkI46PyB19RHkxg54OUORiIiso/WHGmqQsP+5wbV0+4riSnxwn/JXN4pmnE//stnyAyoiEZkPvBtwJjKb3Ni9n3eNLNs6gnaXrCtaygEZdebikr9kS2g9mM696HvIFgM6cdR/wZ7DcLbG3IdTXuHN7PC3xxL+Y4ek5iMreQIPmuvs4qslbthPGYoYbYLUQiRa9XO5s/ksIj5Z14f7anHE6cuTQVpvNWdGDOigyIVS5qU+4ZF7j+rifzOXVL48gmcAvw/uV68m5Wl/p0qsC/d8vI3GYwEsWG/EzpAlc07l8BU2LxWgN+d7uwBFaJV9VtmUDs5dcslsh8IbzmtC9gq3OLGjklxTfIl6qPiL8U33oc/UwqzvZUrI2BlbagvIZYy6rP+q0= kierank@mockingjay"
];