228 lines
5.6 KiB
Nix
228 lines
5.6 KiB
Nix
{ config, pkgs, inputs, isDesktop, ... }:
|
||
|
||
{
|
||
home.username = "alex";
|
||
home.homeDirectory = "/home/alex";
|
||
|
||
# link the configuration file in current directory to the specified location in home directory
|
||
# home.file.".config/i3/wallpaper.jpg".source = ./wallpaper.jpg;
|
||
|
||
# link all files in `./scripts` to `~/.config/i3/scripts`
|
||
# home.file.".config/i3/scripts" = {
|
||
# source = ./scripts;
|
||
# recursive = true; # link recursively
|
||
# executable = true; # make all files executable
|
||
# };
|
||
|
||
# encode the file content in nix configuration file directly
|
||
# home.file.".xxx".text = ''
|
||
# xxx
|
||
# '';
|
||
|
||
home.shellAliases = {
|
||
e = "ls -lh";
|
||
tree = "eza --tree";
|
||
l = "ls";
|
||
ll = "eza -l";
|
||
clip = "xclip -selection clipboard";
|
||
vi = "nvim";
|
||
vim = "nvim";
|
||
mtr = "mtr -t";
|
||
tm = "tmux attach || tmux";
|
||
};
|
||
|
||
home.file.".config/atuin/config.toml".source = ./atuin/config.toml;
|
||
home.file.".config/nvim/init.lua".source = ./nvim/init.lua;
|
||
home.file.".config/tmux/tmux.conf".source = ./tmux/tmux.conf;
|
||
home.file.".config/tmux/tmux.conf.local".source = ./tmux/tmux.conf.local;
|
||
home.file.".wezterm.lua".source = ./wezterm.lua;
|
||
home.file.".config/jrnl/jrnl.yaml".source = ./jrnl/jrnl.yaml;
|
||
home.file.".config/fish/functions" = {
|
||
source = ./fish/functions;
|
||
recursive = true;
|
||
};
|
||
|
||
home.packages = with pkgs; [
|
||
|
||
atuin
|
||
tmux
|
||
|
||
fastfetch
|
||
nnn # terminal file manager
|
||
|
||
nerd-fonts.lilex
|
||
fira-code
|
||
|
||
# archives
|
||
zip
|
||
xz
|
||
unzip
|
||
# p7zip
|
||
|
||
# utils
|
||
ripgrep # recursively searches directories for a regex pattern
|
||
bat
|
||
jq # A lightweight and flexible command-line JSON processor
|
||
# yq-go # yaml processor https://github.com/mikefarah/yq
|
||
eza # A modern replacement for ‘ls’
|
||
fzf # A command-line fuzzy finder
|
||
fd
|
||
xclip
|
||
trash-cli
|
||
|
||
# networking tools
|
||
dig
|
||
mtr # A network diagnostic tool
|
||
# iperf3
|
||
# dnsutils # `dig` + `nslookup`
|
||
# ldns # replacement of `dig`, it provide the command `drill`
|
||
# aria2 # A lightweight multi-protocol & multi-source command-line download utility
|
||
# socat # replacement of openbsd-netcat
|
||
# nmap # A utility for network discovery and security auditing
|
||
# ipcalc # it is a calculator for the IPv4/v6 addresses
|
||
|
||
# misc
|
||
cowsay
|
||
file
|
||
which
|
||
tree
|
||
# gnused
|
||
# gnutar
|
||
# gawk
|
||
# zstd
|
||
gnupg
|
||
|
||
# nix related
|
||
#
|
||
# it provides the command `nom` works just like `nix`
|
||
# with more details log output
|
||
nix-output-monitor
|
||
|
||
# # productivity
|
||
# hugo # static site generator
|
||
# glow # markdown previewer in terminal
|
||
|
||
btop # replacement of htop/nmon
|
||
iotop # io monitoring
|
||
iftop # network monitoring
|
||
|
||
# system call monitoring
|
||
strace # system call monitoring
|
||
ltrace # library call monitoring
|
||
lsof # list open files
|
||
|
||
# system tools
|
||
# sysstat
|
||
lm_sensors # for `sensors` command
|
||
ethtool
|
||
pciutils # lspci
|
||
usbutils # lsusb
|
||
zoxide
|
||
] ++ (if isDesktop then [
|
||
anki-bin
|
||
wezterm
|
||
chromium
|
||
darktable
|
||
nextcloud-client
|
||
bitwarden-desktop
|
||
signal-desktop
|
||
spotify
|
||
] else []);
|
||
|
||
# basic configuration of git, please change to your own
|
||
programs.git = {
|
||
enable = true;
|
||
userName = "Alexander Wainwright";
|
||
userEmail = "code@figtree.dev";
|
||
};
|
||
|
||
# starship - an customizable prompt for any shell
|
||
programs.starship = {
|
||
enable = true;
|
||
settings = {
|
||
add_newline = true;
|
||
aws.disabled = true;
|
||
gcloud.disabled = true;
|
||
line_break.disabled = false;
|
||
character = {
|
||
success_symbol = "[➜](green)";
|
||
error_symbol = "[➜](bold red)";
|
||
};
|
||
username = {
|
||
disabled = false;
|
||
show_always = true;
|
||
style_user = "green";
|
||
};
|
||
hostname = {
|
||
ssh_only = false;
|
||
ssh_symbol = " ";
|
||
format = "[$ssh_symbol](bold blue)[$hostname](red) ";
|
||
disabled = false;
|
||
};
|
||
directory = {
|
||
style = "blue";
|
||
truncate_to_repo = false;
|
||
};
|
||
git_status = {
|
||
style = "yellow";
|
||
};
|
||
container = {
|
||
disabled = true;
|
||
};
|
||
};
|
||
};
|
||
|
||
programs.fish = {
|
||
enable = true;
|
||
interactiveShellInit = ''
|
||
source ~/.config/fish/functions/cardboard.fish
|
||
source ~/.config/fish/functions/bangbang.fish
|
||
source ~/.config/fish/functions/borg-h.fish
|
||
|
||
set PATH ~/.cargo/bin $PATH
|
||
set PATH ~/scripts $PATH
|
||
set PATH ~/.local/bin $PATH
|
||
|
||
set fish_prompt_pwd_dir_length 0
|
||
set fish_greeting
|
||
|
||
# eza colours
|
||
set -x EZA_COLORS "di=0:oc=0:ur=0:uw=0:ux=0:ue=0:gr=0:gw=0:gx=0:tr=0:tw=0:tx=0:su=0:sf=0"
|
||
|
||
# enable atuin if available
|
||
if command -q atuin
|
||
atuin init fish | source
|
||
else
|
||
echo "Warning: Atuin is not installed, skipping initialisation."
|
||
end
|
||
|
||
starship init fish | source
|
||
|
||
zoxide init fish | source
|
||
'';
|
||
};
|
||
|
||
programs.bash = {
|
||
enable = true;
|
||
enableCompletion = true;
|
||
# TODO add your custom bashrc here
|
||
bashrcExtra = ''
|
||
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
||
'';
|
||
};
|
||
|
||
programs.neovim = {
|
||
enable = true;
|
||
defaultEditor = true;
|
||
};
|
||
|
||
# This value determines the home Manager release that your
|
||
# configuration is compatible with. This helps avoid breakage
|
||
# when a new home Manager release introduces backwards
|
||
# incompatible changes.
|
||
#
|
||
# You can update home Manager without changing this value. See
|
||
# the home Manager release notes for a list of state version
|
||
# changes in each release.
|
||
home.stateVersion = "25.05";
|
||
}
|