Skip to content

Commit

Permalink
Add shell configurations via Home-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
yousiki committed Feb 16, 2024
1 parent 2c14103 commit 6a297b1
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/darwinConfigurations/sakamoto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
imports = with homeProfiles; [
base
lang.complete
shell
stylix
];
};
Expand Down
196 changes: 196 additions & 0 deletions src/homeProfiles/shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
# Shell configurations via Home-manager.
{globals, ...}: {
config,
lib,
pkgs,
...
}:
with builtins // lib; {
programs = {
# bash
bash = {
enable = true;
enableCompletion = true;
};

# bat
bat = {
enable = true;
extraPackages = with pkgs.bat-extras; [
batdiff
batgrep
batman
batpipe
batwatch
prettybat
];
};

# bottom
bottom = {
enable = true;
};

# btop
btop = {
enable = true;
};

# eza (exa)
eza = {
enable = true;
enableAliases = true;
icons = true;
git = true;
};

# fzf
fzf = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
tmux.enableShellIntegration = true;
};

# gh (github-cli)
gh = {
enable = true;
gitCredentialHelper.enable = true;
extensions = with pkgs; [
gh-actions-cache
gh-cal
gh-dash
gh-eco
gh-markdown-preview
];
};

# git
git = {
enable = true;
lfs.enable = true;
delta.enable = true;
userName = "yousiki";
userEmail = "[email protected]";
extraConfig = {
pull.rebase = false;
push.followTags = true;
};
};

# gitui
gitui = {
enable = true;
};

# helix (hx)
helix = {
enable = true;
languages = {
# the language-server option currently requires helix from the master branch at https://github.com/helix-editor/helix/
language-server.typescript-language-server = with pkgs.nodePackages; {
command = "''${typescript-language-server}/bin/typescript-language-server";
args = ["--stdio" "--tsserver-path=''${typescript}/lib/node_modules/typescript/lib"];
};
language =
map
(name: {
name = name;
auto-format = true;
}) ["rust" "python" "nix"];
};
settings = {
editor = {
line-number = "relative";
lsp.display-messages = true;
};
};
};

# mcfly
mcfly = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
fuzzySearchFactor = 3;
};

# starship
starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
enableIonIntegration = true;
enableNushellIntegration = true;
enableTransience = true;
};

# tmux
tmux = {
enable = true;
};

# zellij
zellij = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};

# zoxide
zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
enableNushellIntegration = true;
};

# zsh
zsh = {
enable = true;
enableCompletion = true;
autocd = true;
enableAutosuggestions = true;
historySubstringSearch.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
theme = "robbyrussell";
plugins = [
"copyfile"
"copypath"
"docker"
"fzf"
"git"
"gitignore"
"history"
"python"
"rust"
"thefuck"
"zsh-interactive-cd"
];
};
initExtra = ''
bindkey "\e[1;3D" backward-word # ⌥←
bindkey "\e[1;3C" forward-word # ⌥→
'';
};
};

home.packages = with pkgs; [
cachix
du-dust
fd
gdu
home-manager
mc
rclone
rsync
statix
thefuck
];
}
9 changes: 6 additions & 3 deletions src/homeProfiles/stylix.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Basic configurations for Home-manager.
# Stylix configuration via Home-manager.
{globals, ...}: {
config,
lib,
Expand All @@ -10,6 +10,9 @@ with builtins // lib; {
globals.inputs.stylix.homeManagerModules.stylix
];

stylix.image = "${globals.root}/static/images/AyanamiRei_2.png";
stylix.base16Scheme = "${globals.inputs.schemes}/base16/catppuccin-mocha.yaml";
stylix = {
image = "${globals.root}/static/images/AyanamiRei_2.png";

base16Scheme = "${globals.inputs.schemes}/base16/catppuccin-mocha.yaml";
};
}

0 comments on commit 6a297b1

Please sign in to comment.