From 898826b7d3d4d4cb57aa0b16b7729f43a5a791ec Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Wed, 17 Apr 2024 16:19:47 +0300 Subject: [PATCH] cleanup --- home/default.nix | 29 ++++++++++++- modules/home/programs/default.nix | 1 + modules/home/programs/nushell/default.nix | 50 ++++++++++------------ modules/home/programs/starship/default.nix | 12 ++++++ modules/home/programs/zsh/default.nix | 15 ------- 5 files changed, 62 insertions(+), 45 deletions(-) create mode 100644 modules/home/programs/starship/default.nix diff --git a/home/default.nix b/home/default.nix index a5e4268..10ab4ad 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,7 +1,32 @@ { system, pkgs, home-manager, modules, nid, ... }: let - ivand-programs = with modules.home.programs; [ nvim zsh tmux git chromium firefox kitty lf obs-studio sway swaylock browserpass bottom gpg comma nushell waybar tealdeer pueue ]; - ivand-packages = with modules.home.packages; [ dev essential media ]; + ivand-programs = with modules.home.programs; [ + nvim + zsh + tmux + git + chromium + firefox + kitty + lf + obs-studio + sway + swaylock + browserpass + bottom + gpg + comma + nushell + waybar + tealdeer + pueue + starship + ]; + ivand-packages = with modules.home.packages; [ + dev + essential + media + ]; in { ivand = home-manager.lib.homeManagerConfiguration { diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 6df512e..7c3ef55 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -15,6 +15,7 @@ nushell = import ./nushell; obs-studio = import ./obs-studio { inherit pkgs; }; pueue = import ./pueue; + starship = import ./starship; sway = import ./sway { inherit pkgs; }; swaylock = import ./swaylock; tealdeer = import ./tealdeer; diff --git a/modules/home/programs/nushell/default.nix b/modules/home/programs/nushell/default.nix index 3a6de18..dbeeea8 100644 --- a/modules/home/programs/nushell/default.nix +++ b/modules/home/programs/nushell/default.nix @@ -1,9 +1,8 @@ { - programs = { - nushell = { - enable = true; - environmentVariables = { - config = ''{ + programs.nushell = { + enable = true; + environmentVariables = { + config = ''{ show_banner: false, completions: { quick: true @@ -12,30 +11,25 @@ } } ''; - PASSWORD_STORE_DIR = "($env.HOME | path join .password-store)"; - PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))"; - EDITOR = "nvim"; - }; - shellAliases = { - gcal = '' - bash -c "cal $(date +%Y)" - ''; - la = "ls -al"; - ssh = "TERM=xterm-256color ssh"; - dev = "nix develop --command $env.SHELL"; - torrent = "transmission-remote"; - vi = "nvim"; - sc = "systemctl"; - }; - loginFile.text = '' - if (tty) == "/dev/tty1" { - sway - } + PASSWORD_STORE_DIR = "($env.HOME | path join .password-store)"; + PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))"; + EDITOR = "nvim"; + }; + shellAliases = { + gcal = '' + bash -c "cal $(date +%Y)" ''; + la = "ls -al"; + ssh = "TERM=xterm-256color ssh"; + dev = "nix develop --command $env.SHELL"; + torrent = "transmission-remote"; + vi = "nvim"; + sc = "systemctl"; }; - starship = { - enable = true; - enableNushellIntegration = true; - }; + loginFile.text = '' + if (tty) == "/dev/tty1" { + sway + } + ''; }; } diff --git a/modules/home/programs/starship/default.nix b/modules/home/programs/starship/default.nix new file mode 100644 index 0000000..74a06ab --- /dev/null +++ b/modules/home/programs/starship/default.nix @@ -0,0 +1,12 @@ +{ + programs.starship = { + enable = true; + enableNushellIntegration = true; + enableZshIntegration = true; + settings = { + sudo = { + disabled = false; + }; + }; + }; +} diff --git a/modules/home/programs/zsh/default.nix b/modules/home/programs/zsh/default.nix index b678a90..4af1ffa 100644 --- a/modules/home/programs/zsh/default.nix +++ b/modules/home/programs/zsh/default.nix @@ -31,20 +31,5 @@ history = { expireDuplicatesFirst = true; }; - plugins = [ - { - name = "zsh-powerlevel10k"; - src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k"; - file = "powerlevel10k.zsh-theme"; - } - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell"; - } - ]; - initExtra = '' - source "$HOME/.p10k.zsh" - ''; }; }