1
0
Fork 0
dotfiles/home.nix

87 lines
1.9 KiB
Nix
Raw Normal View History

2021-12-13 13:00:48 +00:00
{ config, pkgs, lib, ... }:
2021-12-06 22:35:29 +00:00
{
imports = [
./programs/fish.nix
./programs/starship.nix
2021-12-12 18:19:44 +00:00
./config/kitty.nix
2021-12-06 22:35:29 +00:00
./programs/nvim
./programs/git.nix
2021-12-19 20:32:38 +00:00
./programs/lazygit.nix
2021-12-06 22:35:29 +00:00
./programs/bat.nix
./programs/jq.nix
./config/yt-dlp.nix
];
home = {
packages = with pkgs; [
aria2
arp-scan
atomicparsley
cachix
2021-12-14 19:34:31 +00:00
cliclick
2021-12-06 22:35:29 +00:00
dogdns
exa
fd
ffmpeg
fzf
gallery-dl
hexyl
hyperfine
nix-prefetch-github
parallel
2021-12-28 18:48:27 +00:00
podman
2021-12-06 22:35:29 +00:00
procs
2021-12-28 18:48:27 +00:00
qemu
2021-12-06 22:35:29 +00:00
ripgrep
rtmpdump
tokei
2021-12-12 23:01:54 +00:00
wget
2021-12-28 18:48:27 +00:00
xz
2021-12-06 22:35:29 +00:00
yt-dlp
];
2021-12-13 13:00:48 +00:00
activation = {
updateAppCaches = lib.hm.dag.entryAfter [ "onFilesChange" "installPackages" "copyFonts" ] ''
# nixpkgs
echo "Calculating new NIX_PATH value ..."
mkdir -p "$HOME/.cache/fish"
nix flake metadata ~/.config/nixpkgs --json 2>/dev/null | \
jq -r '.locks.nodes.nixpkgs.locked | "\(.type):\(.owner)/\(.repo)/\(.rev)"' | \
xargs -I {} nix flake metadata {} --json | \
jq -r '. | "nixpkgs=\(.path)"' >"$HOME/.cache/fish/nix_path_value"
# neovim
2021-12-18 23:10:41 +00:00
echo -n "Running LuaCacheClear: "
nvim -c 'try | execute "LuaCacheClear" | echo "Done" | catch /.*/ | echo "Command not found" | endtry | q' --headless
printf '\nRemoving luacache file: '
rm -f "$HOME/.cache/nvim/luacache"
echo "Done"
2021-12-20 21:29:36 +00:00
echo 'Running TSUpdateSync ...'
nvim -c 'try | execute "TSUpdateSync" | echo "Done" | catch /.*/ | echo "Command not found" | endtry | q' --headless
printf '\n'
'';
2021-12-20 21:29:36 +00:00
reportChanges = lib.hm.dag.entryAfter [ "updateAppCaches" ] ''
2021-12-13 13:00:48 +00:00
nix store diff-closures $oldGenPath $newGenPath
'';
};
2021-12-06 22:35:29 +00:00
};
programs = {
home-manager.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
zoxide.enable = true;
};
}