mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-05-10 21:05:04 +02:00
Consolidate a minimal home-manager configuration
This commit is contained in:
parent
16f6b47198
commit
6c7c7cf1e5
4 changed files with 135 additions and 127 deletions
|
|
@ -1,37 +1,6 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
{config, ...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "traxys";
|
||||
userEmail = config.extraInfo.email;
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
syntax-theme = "Dracula";
|
||||
plus-style = "auto \"#121bce\"";
|
||||
plus-emph-style = "auto \"#6083eb\"";
|
||||
};
|
||||
};
|
||||
extraConfig = {
|
||||
diff = {
|
||||
algorithm = "histogram";
|
||||
};
|
||||
core = {
|
||||
excludesfile = "${config.home.homeDirectory}/.gitignore";
|
||||
};
|
||||
};
|
||||
aliases = {
|
||||
ri = "rebase -i";
|
||||
amend = "commit --amend";
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".gitignore".source = ./gitignore;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
.cache
|
||||
compile_commands.json
|
||||
54
home.nix
54
home.nix
|
|
@ -12,57 +12,26 @@
|
|||
};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
neovimTraxys
|
||||
bitwarden-cli
|
||||
nodePackages.vscode-json-languageserver
|
||||
exa
|
||||
python3
|
||||
topgrade
|
||||
rsync
|
||||
fd
|
||||
niv
|
||||
bintools
|
||||
httpie
|
||||
sqlx-cli
|
||||
codespell
|
||||
ripgrep
|
||||
file
|
||||
jq
|
||||
wget
|
||||
cargo-flamegraph
|
||||
linuxPackages.perf
|
||||
unzip
|
||||
tokei
|
||||
gcc11
|
||||
#nix-alien
|
||||
xdg-ninja
|
||||
bc
|
||||
kabalist_cli
|
||||
comma
|
||||
raclette
|
||||
oscclip
|
||||
nvfetcher
|
||||
hbw
|
||||
gnumake
|
||||
gdb
|
||||
pandoc
|
||||
# Usefull for pandoc to latex
|
||||
(texlive.combine {
|
||||
inherit
|
||||
(texlive)
|
||||
scheme-medium
|
||||
fncychap
|
||||
wrapfig
|
||||
capt-of
|
||||
framed
|
||||
upquote
|
||||
needspace
|
||||
tabulary
|
||||
varwidth
|
||||
titlesec
|
||||
;
|
||||
})
|
||||
man-pages
|
||||
];
|
||||
|
||||
services = {
|
||||
|
|
@ -71,33 +40,11 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
nix.registry = {
|
||||
"my".flake = flake;
|
||||
};
|
||||
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
bat = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
|
|
@ -138,7 +85,6 @@ in {
|
|||
initExtraBeforeCompInit = ''
|
||||
fpath+="$HOME/.zfunc"
|
||||
'';
|
||||
envExtra = "export EDITOR=nvim";
|
||||
shellAliases = {
|
||||
new-direnv = "nix flake new -t github:nix-community/nix-direnv";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,51 +1,146 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
flake,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
nix-zsh-completions
|
||||
];
|
||||
options.programs.git.excludes = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "wd" "rust"];
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "fast-syntax-highlighting.plugin.zsh";
|
||||
src = inputs.fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = inputs.zsh-nix-shell;
|
||||
}
|
||||
config = {
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
comma
|
||||
fd
|
||||
file
|
||||
gdb
|
||||
gnumake
|
||||
jq
|
||||
man-pages
|
||||
neovimTraxys
|
||||
nix-zsh-completions
|
||||
oscclip
|
||||
pandoc
|
||||
raclette
|
||||
ripgrep
|
||||
rsync
|
||||
tokei
|
||||
unzip
|
||||
wget
|
||||
|
||||
# Useful for pandoc to latex
|
||||
(texlive.combine {
|
||||
inherit
|
||||
(texlive)
|
||||
scheme-medium
|
||||
fncychap
|
||||
wrapfig
|
||||
capt-of
|
||||
framed
|
||||
upquote
|
||||
needspace
|
||||
tabulary
|
||||
varwidth
|
||||
titlesec
|
||||
;
|
||||
})
|
||||
];
|
||||
|
||||
initExtra = ''
|
||||
export PATH="$PATH:$HOME/bin";
|
||||
source ${./p10k.zsh}
|
||||
source ${inputs.powerlevel10k}/powerlevel10k.zsh-theme
|
||||
if [ -f "$HOME/.zvars" ]; then
|
||||
source "$HOME/.zvars"
|
||||
fi
|
||||
|
||||
${pkgs.fortune}/bin/fortune \
|
||||
| ${pkgs.cowsay}/bin/cowsay \
|
||||
| ${pkgs.dotacat}/bin/dotacat
|
||||
'';
|
||||
shellAliases = {
|
||||
cat = "${pkgs.bat}/bin/bat -p";
|
||||
ls = "${pkgs.exa}/bin/exa --icons";
|
||||
nix.registry = {
|
||||
"my".flake = flake;
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".zprofile".source = ./zprofile;
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
programs.bat.enable = true;
|
||||
programs.zoxide.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
syntax-theme = "Dracula";
|
||||
plus-style = "auto \"#121bce\"";
|
||||
plus-emph-style = "auto \"#6083eb\"";
|
||||
};
|
||||
};
|
||||
|
||||
excludes = ''
|
||||
.cache
|
||||
compile_commands.json
|
||||
'';
|
||||
|
||||
extraConfig = {
|
||||
diff = {
|
||||
algorithm = "histogram";
|
||||
};
|
||||
core = {
|
||||
excludesfile = "${pkgs.writeText "gitignore" config.programs.git.excludes}";
|
||||
};
|
||||
};
|
||||
|
||||
aliases = {
|
||||
ri = "rebase -i";
|
||||
amend = "commit --amend";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = ["git" "wd" "rust"];
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "fast-syntax-highlighting.plugin.zsh";
|
||||
src = inputs.fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = inputs.zsh-nix-shell;
|
||||
}
|
||||
];
|
||||
|
||||
envExtra = "export EDITOR=nvim";
|
||||
|
||||
initExtra = ''
|
||||
export PATH="$PATH:$HOME/bin";
|
||||
source ${./p10k.zsh}
|
||||
source ${inputs.powerlevel10k}/powerlevel10k.zsh-theme
|
||||
if [ -f "$HOME/.zvars" ]; then
|
||||
source "$HOME/.zvars"
|
||||
fi
|
||||
|
||||
${pkgs.fortune}/bin/fortune \
|
||||
| ${pkgs.cowsay}/bin/cowsay \
|
||||
| ${pkgs.dotacat}/bin/dotacat
|
||||
'';
|
||||
shellAliases = {
|
||||
cat = "${pkgs.bat}/bin/bat -p";
|
||||
ls = "${pkgs.exa}/bin/exa --icons";
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".zprofile".source = ./zprofile;
|
||||
};
|
||||
|
||||
home.stateVersion = "21.11";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue