2024-05-18 11:31:35 -07:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2020-10-12 00:47:07 -07:00
|
|
|
|
|
|
|
{
|
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
programs.home-manager.enable = true;
|
|
|
|
|
2021-04-11 23:31:11 -07:00
|
|
|
imports = (import ./programs);
|
|
|
|
|
2024-05-18 11:31:35 -07:00
|
|
|
nixpkgs.config.allowUnfreePredicate =
|
|
|
|
pkg:
|
|
|
|
builtins.elem (lib.getName pkg) [
|
|
|
|
"discord"
|
|
|
|
"slack"
|
|
|
|
"vscode"
|
2024-08-07 09:24:30 -07:00
|
|
|
"vscode-extension-github-copilot"
|
|
|
|
"vscode-extension-github-copilot-chat"
|
2024-05-18 11:31:35 -07:00
|
|
|
"vscode-extension-MS-python-vscode-pylance"
|
|
|
|
"zoom"
|
|
|
|
];
|
2022-08-08 00:37:22 -07:00
|
|
|
|
2021-04-11 23:31:11 -07:00
|
|
|
home = {
|
2024-06-02 14:05:08 -07:00
|
|
|
stateVersion = "24.05";
|
2021-04-11 23:31:11 -07:00
|
|
|
sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
VISUAL = "$EDITOR";
|
|
|
|
};
|
2022-08-07 22:50:23 -07:00
|
|
|
packages = with pkgs; [
|
|
|
|
any-nix-shell
|
|
|
|
aspell
|
2024-09-07 11:10:17 -07:00
|
|
|
basedpyright
|
|
|
|
bash-language-server
|
2022-08-07 22:50:23 -07:00
|
|
|
cachix
|
|
|
|
cmake
|
|
|
|
coursier
|
2024-03-23 10:14:43 -07:00
|
|
|
curlFull
|
2023-02-28 18:38:05 -08:00
|
|
|
delta
|
2024-03-23 10:14:43 -07:00
|
|
|
deno
|
2024-04-26 12:20:53 -07:00
|
|
|
devenv
|
2023-12-03 22:32:43 -08:00
|
|
|
discord
|
2024-06-07 22:58:32 -07:00
|
|
|
dua
|
2022-08-07 22:50:23 -07:00
|
|
|
fd
|
|
|
|
ffmpeg
|
2023-10-21 08:38:48 -07:00
|
|
|
fishPlugins.foreign-env
|
|
|
|
fishPlugins.bobthefish
|
2022-09-18 15:10:19 -07:00
|
|
|
font-awesome
|
2022-08-07 22:50:23 -07:00
|
|
|
gitAndTools.diff-so-fancy
|
|
|
|
gnupg
|
|
|
|
go
|
2022-12-10 11:46:19 -08:00
|
|
|
graphviz
|
2024-09-07 11:10:17 -07:00
|
|
|
jq-lsp
|
2022-08-07 22:50:23 -07:00
|
|
|
luajit
|
2024-09-07 11:10:17 -07:00
|
|
|
lua-language-server
|
2023-02-24 18:19:14 -08:00
|
|
|
marksman
|
2024-10-26 14:38:40 -07:00
|
|
|
marp-cli
|
2022-08-07 22:50:23 -07:00
|
|
|
maven
|
2023-12-17 15:32:00 -08:00
|
|
|
metals
|
2022-08-07 22:50:23 -07:00
|
|
|
multimarkdown
|
|
|
|
mypy
|
|
|
|
neofetch
|
|
|
|
neovim
|
2024-06-07 23:26:11 -07:00
|
|
|
nil
|
2022-08-07 22:50:23 -07:00
|
|
|
niv
|
2024-09-07 11:10:17 -07:00
|
|
|
nixd
|
2022-08-07 22:50:23 -07:00
|
|
|
nix-index
|
2024-05-18 11:31:35 -07:00
|
|
|
nixfmt-rfc-style
|
2022-10-08 11:48:26 -07:00
|
|
|
nix-prefetch-git
|
2023-02-11 14:52:08 -08:00
|
|
|
nodejs
|
2024-02-18 21:29:00 -08:00
|
|
|
ollama
|
2022-08-07 22:50:23 -07:00
|
|
|
openssl
|
|
|
|
pandoc
|
|
|
|
patchelf
|
2024-02-17 15:58:59 -08:00
|
|
|
pngpaste
|
2023-01-04 18:12:50 -08:00
|
|
|
prettyping
|
2024-02-18 21:29:00 -08:00
|
|
|
python3Packages.huggingface-hub
|
2024-02-19 22:39:38 -08:00
|
|
|
python3Packages.jupyterlab
|
2022-08-07 22:50:23 -07:00
|
|
|
rclone
|
|
|
|
readline
|
|
|
|
ripgrep
|
2024-11-01 19:22:00 -07:00
|
|
|
ripgrep-all
|
2024-03-23 10:14:43 -07:00
|
|
|
rustup
|
2022-08-07 22:50:23 -07:00
|
|
|
sbt
|
|
|
|
scala-cli
|
|
|
|
shellcheck
|
2024-05-19 17:15:05 -07:00
|
|
|
skimpdf
|
2023-12-03 22:32:43 -08:00
|
|
|
slack
|
2023-09-22 20:37:08 -07:00
|
|
|
slides
|
2024-05-18 11:01:47 -07:00
|
|
|
slumber
|
2022-08-07 22:50:23 -07:00
|
|
|
sqlite
|
|
|
|
stylua
|
|
|
|
tealdeer
|
2022-09-18 15:10:19 -07:00
|
|
|
tectonic
|
|
|
|
texlab
|
2022-08-07 22:50:23 -07:00
|
|
|
tig
|
|
|
|
tokei
|
|
|
|
tree
|
|
|
|
tree-sitter
|
2024-09-07 11:10:17 -07:00
|
|
|
typescript
|
|
|
|
typescript-language-server
|
2023-12-03 22:32:43 -08:00
|
|
|
wget
|
2024-07-07 19:22:52 -07:00
|
|
|
vscode-langservers-extracted
|
2024-10-26 10:56:17 -07:00
|
|
|
# xcodes
|
2022-08-07 22:50:23 -07:00
|
|
|
xz
|
2024-09-07 11:10:17 -07:00
|
|
|
yaml-language-server
|
2022-08-07 22:50:23 -07:00
|
|
|
yq
|
2023-12-03 22:32:43 -08:00
|
|
|
zoom-us
|
2022-08-07 22:50:23 -07:00
|
|
|
];
|
2020-10-12 00:47:07 -07:00
|
|
|
};
|
|
|
|
|
2021-04-11 11:19:06 -07:00
|
|
|
programs.bat = {
|
2024-03-23 10:14:43 -07:00
|
|
|
enable = true;
|
2021-04-11 11:19:06 -07:00
|
|
|
};
|
|
|
|
|
2024-02-18 21:29:00 -08:00
|
|
|
programs.btop = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-04-08 16:32:46 -07:00
|
|
|
|
2023-12-06 23:03:53 -08:00
|
|
|
programs.darcs = {
|
|
|
|
enable = true;
|
2024-05-18 11:31:35 -07:00
|
|
|
author = [ "Salar Rahmanian <code@softinio.com>" ];
|
2023-12-06 23:03:53 -08:00
|
|
|
boring = [
|
|
|
|
"^.idea$"
|
|
|
|
"^.direnv$"
|
|
|
|
"^.envrc$"
|
|
|
|
"^.vscode$"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-09-07 08:04:39 -07:00
|
|
|
programs.direnv = {
|
2021-04-11 11:19:06 -07:00
|
|
|
enable = true;
|
2021-09-07 08:04:39 -07:00
|
|
|
nix-direnv.enable = true;
|
2021-04-11 11:19:06 -07:00
|
|
|
};
|
|
|
|
|
2023-09-22 20:37:08 -07:00
|
|
|
programs.eza = {
|
|
|
|
enable = true;
|
2024-03-23 10:14:43 -07:00
|
|
|
enableFishIntegration = true;
|
2023-09-22 20:37:08 -07:00
|
|
|
git = true;
|
2024-10-20 20:36:27 -07:00
|
|
|
icons = "auto";
|
2023-09-22 20:37:08 -07:00
|
|
|
extraOptions = [
|
|
|
|
"--group-directories-first"
|
|
|
|
"--long"
|
|
|
|
"--header"
|
|
|
|
"--all"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-09-07 08:04:39 -07:00
|
|
|
programs.fzf = {
|
2021-04-11 11:19:06 -07:00
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.gh = {
|
|
|
|
enable = true;
|
2021-11-07 13:24:41 -08:00
|
|
|
settings = {
|
|
|
|
editor = "nvim";
|
|
|
|
git_protocol = "ssh";
|
2024-01-23 20:31:55 -08:00
|
|
|
prompt = "enabled";
|
|
|
|
aliases = {
|
|
|
|
co = "pr checkout";
|
|
|
|
pv = "pr view";
|
|
|
|
};
|
2021-11-07 13:24:41 -08:00
|
|
|
};
|
2021-04-11 11:19:06 -07:00
|
|
|
};
|
|
|
|
|
2023-09-23 15:30:58 -07:00
|
|
|
programs.gh-dash = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2023-04-30 11:44:34 -07:00
|
|
|
programs.helix = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
theme = "tokyonight";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-10-12 00:47:07 -07:00
|
|
|
programs.htop = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-09-16 21:23:51 -07:00
|
|
|
programs.java = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2020-10-12 00:47:07 -07:00
|
|
|
programs.jq = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-01-23 20:31:55 -08:00
|
|
|
programs.lazygit = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
2024-02-18 21:29:00 -08:00
|
|
|
programs.nix-index = {
|
|
|
|
enable = true;
|
|
|
|
enableFishIntegration = true;
|
|
|
|
};
|
|
|
|
|
2020-10-12 00:47:07 -07:00
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
2024-08-30 22:20:27 -07:00
|
|
|
enableFishIntegration = true;
|
2020-10-12 00:47:07 -07:00
|
|
|
settings = {
|
2021-06-23 22:52:33 -07:00
|
|
|
command_timeout = 1000;
|
2021-06-07 21:08:10 -07:00
|
|
|
character = {
|
|
|
|
success_symbol = " [λ](bold green)";
|
|
|
|
error_symbol = " [λ](bold red)";
|
|
|
|
};
|
2020-10-12 00:47:07 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.fish = {
|
|
|
|
enable = true;
|
|
|
|
|
2021-10-04 21:32:23 -07:00
|
|
|
functions = {
|
|
|
|
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
|
|
|
|
};
|
|
|
|
|
2023-10-21 08:38:48 -07:00
|
|
|
plugins = [ ];
|
2020-10-12 00:47:07 -07:00
|
|
|
|
|
|
|
loginShellInit = ''
|
2020-11-09 14:25:57 -08:00
|
|
|
set -xg TERM xterm-256color
|
2020-10-12 00:47:07 -07:00
|
|
|
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
|
|
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
|
|
end
|
|
|
|
|
|
|
|
if test -e /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
|
|
|
fenv source /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
|
|
|
end
|
|
|
|
|
|
|
|
if test -e $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
|
|
fenv source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
|
|
end
|
|
|
|
|
2021-11-07 13:24:41 -08:00
|
|
|
set -xg PATH $HOME/bin $HOME/.cargo/bin $PATH
|
2020-10-12 00:47:07 -07:00
|
|
|
|
2024-05-19 22:53:50 -07:00
|
|
|
set -xg PATH /Users/salar/.luarocks/bin:/Users/salar/bin:/Users/salar/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin $PATH
|
2023-01-04 18:12:50 -08:00
|
|
|
|
2021-07-14 22:46:35 -07:00
|
|
|
set -xg WORKSPACE /Users/salar/Projects
|
|
|
|
|
2020-10-12 08:14:13 -07:00
|
|
|
set -xg FZF_DEFAULT_OPTS "--preview='bat {} --color=always'" \n
|
2021-02-11 19:34:44 -08:00
|
|
|
|
|
|
|
set -xg TOOLCHAINS swift
|
2024-03-23 10:14:43 -07:00
|
|
|
'';
|
2020-10-12 00:47:07 -07:00
|
|
|
|
2021-11-07 13:24:41 -08:00
|
|
|
interactiveShellInit = ''
|
2023-06-11 14:09:46 -07:00
|
|
|
set -xg PATH $HOME/bin $HOME/.cargo/bin $PATH
|
2020-10-12 00:47:07 -07:00
|
|
|
eval (direnv hook fish)
|
|
|
|
any-nix-shell fish --info-right | source
|
2024-11-04 09:42:06 -08:00
|
|
|
eval (ssh-agent -c)
|
2023-04-29 23:28:16 -07:00
|
|
|
ssh-add ~/.ssh/id_ed25519 --apple-use-keychain --apple-load-keychain
|
2020-10-12 00:47:07 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
shellAliases = {
|
2024-03-23 10:14:43 -07:00
|
|
|
addsshmac = "ssh-add ~/.ssh/id_ed25519 --apple-use-keychain --apple-load-keychain";
|
|
|
|
cat = "bat";
|
2024-06-07 22:58:32 -07:00
|
|
|
du = "dua i";
|
2024-03-23 10:14:43 -07:00
|
|
|
fzfp = "fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'";
|
|
|
|
ping = "prettyping";
|
2020-10-12 00:47:07 -07:00
|
|
|
".." = "cd ..";
|
2024-03-23 10:14:43 -07:00
|
|
|
pj = "python -m json.tool";
|
|
|
|
l = "ll";
|
|
|
|
g = "git";
|
|
|
|
gl = "git log";
|
|
|
|
gc = "git commit -m";
|
|
|
|
gca = "git commit -am";
|
|
|
|
gws = "git status";
|
|
|
|
gu = "gitui";
|
|
|
|
ghauth = "gh auth login --with-token < ~/.ghauth";
|
|
|
|
gitpurgemain = ''git branch --merged | grep -v "\*" | grep -v "main" | xargs -n 1 git branch -d'';
|
|
|
|
gitpurgemaster = ''git branch --merged | grep -v "\*" | grep -v "master" | xargs -n 1 git branch -d'';
|
|
|
|
giscala = "gitignore scala,vim,java,sbt > .gitignore";
|
|
|
|
gforksync = "git fetch upstream && git merge upstream/master && git push origin master";
|
|
|
|
grep = "grep --color=auto";
|
|
|
|
lg = "lazygit";
|
|
|
|
new-sbt = "sbt new scala/scala-seed.g8";
|
|
|
|
nixc = "cd ~/.config/nixpkgs";
|
|
|
|
nixre = "nix build && sudo ./result/activate";
|
|
|
|
nixinfo = "nix-shell -p nix-info --run \"nix-info -m\"";
|
|
|
|
nixgc = "nix-collect-garbage -d";
|
|
|
|
nixq = "nix-env -qa";
|
|
|
|
nixstorerepair = "nix-store --repair --verify --check-contents";
|
|
|
|
nixupgrade = "nix upgrade-nix";
|
|
|
|
rmxcodederived = "rm -fr ~/Library/Developer/Xcode/DerivedData";
|
|
|
|
v = "nvim";
|
|
|
|
wezk = "wezterm show-keys --lua";
|
|
|
|
sshhcloud1 = "ssh salar@hcloud1.softinio.net";
|
|
|
|
sshhcloud1r = "ssh root@hcloud1.softinio.net";
|
2020-10-12 00:47:07 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-07-11 15:06:37 -07:00
|
|
|
# Neovim Configuration
|
2023-02-11 14:52:08 -08:00
|
|
|
xdg.configFile."nvim".source = builtins.fetchGit {
|
2024-02-17 15:58:59 -08:00
|
|
|
url = "https://code.softinio.com/softinio/nvim-config";
|
2024-11-01 19:22:00 -07:00
|
|
|
rev = "902fbd939c74ece8fabe543e511af36471a1a197";
|
2023-02-11 14:52:08 -08:00
|
|
|
};
|
2020-10-12 00:47:07 -07:00
|
|
|
}
|