Move starship into its own module

This commit is contained in:
Andreas Zweili 2024-02-05 20:59:51 +01:00
parent e9f3a9a877
commit b7a2cc0813
5 changed files with 39 additions and 19 deletions

View File

@ -17,25 +17,6 @@
enableBashIntegration = true;
tmux.enableShellIntegration = true;
};
starship = {
settings = {
add_newline = false;
format = lib.concatStrings [
"$username"
"$hostname"
"$directory"
"$nix_shell"
"$python"
"$git_branch"
"$git_status"
"$character"
];
python = {
format = "[\${symbol}($virtualenv) ]($style)";
};
};
enable = true;
};
vim = {
enable = true;
settings = {

View File

@ -17,6 +17,7 @@
./programs/rapid-photo-downloader
./programs/signal
./programs/ssh
./programs/starship
./programs/telegram
./programs/tmux
./programs/vagrant-wsl

View File

@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.az-starship;
in
{
options = {
programs.az-starship.enable = lib.mkEnableOption "My configuration for Starship";
};
config = lib.mkIf cfg.enable {
programs.starship = {
settings = {
add_newline = false;
format = lib.concatStrings [
"$username"
"$hostname"
"$directory"
"$nix_shell"
"$python"
"$git_branch"
"$git_status"
"$character"
];
python = {
format = "[\${symbol}($virtualenv) ]($style)";
};
};
enable = true;
};
};
}

View File

@ -19,6 +19,7 @@
az-hunspell.enable = true;
az-open-port.enable = true;
az-ssh.enable = true;
az-starship.enable = true;
az-tmux.enable = true;
};
systemd.user.startServices = "sd-switch";

View File

@ -56,6 +56,7 @@
userEmail = "zweili@contria.com";
};
az-hunspell.enable = true;
az-starship.enable = true;
az-tmux.enable = true;
az-vagrant-wsl.enable = true;
bash = {