config/users/pbsds/home/default.nix

162 lines
3.9 KiB
Nix
Raw Normal View History

2022-10-17 22:40:48 +02:00
# https://nix-community.github.io/home-manager/options.html
{ pkgs, config, ... }:
{
#nixpkgs.config.allowUnfree = true;
2024-01-31 22:33:15 +01:00
home.stateVersion = "23.11";
2023-03-11 03:39:06 +01:00
2022-10-17 22:40:48 +02:00
imports = [
2023-12-03 20:54:20 +01:00
./profiles/sops.nix
2023-03-03 23:33:37 +01:00
./profiles/bat.nix
2024-02-25 21:26:02 +01:00
#./profiles/xdg-ninja.nix
2023-03-03 23:33:37 +01:00
./profiles/git.nix
./profiles/gtk.nix
./profiles/micro.nix
2023-10-14 18:23:24 +02:00
./profiles/ast-grep.nix
2023-03-04 00:09:57 +01:00
./profiles/shell.nix
2023-03-03 23:33:37 +01:00
./profiles/ssh.nix
./profiles/tmate.nix
2023-07-19 21:59:13 +02:00
./profiles/update-diff.nix
2023-02-24 21:36:30 +01:00
];
2022-10-17 22:40:48 +02:00
2023-03-12 05:14:28 +01:00
# TODO: add remote-exec once packaged
2022-10-17 22:40:48 +02:00
programs.bash.initExtra = ''
2023-03-03 23:33:37 +01:00
# remote-exec
if command -v remote >/dev/null && command -v remote-quick >/dev/null; then
2023-03-03 23:33:37 +01:00
complete -F _command remote
complete -F _command remote-quick
2022-10-17 22:40:48 +02:00
fi
2023-03-03 23:33:37 +01:00
# TODO: remove
2023-06-20 02:01:04 +02:00
function atom_nix {
#nix-shell -p atom --run "atom $(printf "%q " "$@") --in-process-gpu --no-sandbox"
2023-06-24 20:23:38 +02:00
#nix-shell -p atom --run "atom $(printf "%q " "$@") --no-sandbox"
nix run nixpkgs#atom -- --disable-gpu --in-process-gpu --no-sandbox "$@"
2023-06-20 02:01:04 +02:00
}
2022-10-17 22:40:48 +02:00
'';
home.packages = with pkgs; [
xclip
2023-12-09 22:54:15 +01:00
#rmate-sh # TODO: add to ssh config
#remote-exec # TODO
2022-10-17 22:40:48 +02:00
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
dos2unix
2024-06-06 14:10:35 +02:00
pandoc # TODO: typst and latex
2022-10-17 22:40:48 +02:00
graphviz
vgmstream
gallery-dl
2023-02-24 21:36:30 +01:00
youtube-dl
2023-03-12 05:14:28 +01:00
yt-dlp
2022-10-17 22:40:48 +02:00
ffmpeg-full
visidata
lolcat
toilet
boxes
tewisay
ponysay
2023-03-04 00:09:57 +01:00
# TODO: move to graphical? kiosk?
2022-10-17 22:40:48 +02:00
cage
2023-03-12 05:14:28 +01:00
mesa-demos
2022-10-17 22:40:48 +02:00
librespeed-cli
2023-02-24 21:36:30 +01:00
cachix
2023-03-12 05:14:28 +01:00
#nix-template
2022-10-17 22:40:48 +02:00
nix-output-monitor
nixpkgs-review
2024-03-26 20:52:49 +01:00
unstable.nixpkgs-hammering
unstable.nix-update
unstable.nix-init
unstable.deadnix
unstable.statix
2023-06-29 02:16:16 +02:00
nurl
2022-10-17 22:40:48 +02:00
manix
2024-02-25 15:45:35 +01:00
#comma # collides with nix-index-database
2024-02-01 02:32:35 +01:00
nix-search-cli # nix-search
2022-10-17 22:40:48 +02:00
2023-03-12 05:14:28 +01:00
#sshuttle
#cargo
#cargo-edit
#nim
#nimble
2023-06-11 11:14:01 +02:00
poetry
2022-10-17 22:40:48 +02:00
(python3.withPackages (python-packages: with python-packages; [
2023-03-11 03:39:06 +01:00
matplotlib
more-itertools
2022-10-17 22:40:48 +02:00
numpy
2023-03-11 03:39:06 +01:00
#objexplore # TODO: package this, used in python interactive shell
ptpython
python-lsp-server
pyyaml
requests
2022-10-17 22:40:48 +02:00
rich
2023-03-11 03:39:06 +01:00
scipy
2022-10-17 22:40:48 +02:00
toml
virtualenv
]))
];
2023-03-04 00:09:57 +01:00
2022-10-17 22:40:48 +02:00
home.shellAliases = {
#flexget = "ssh -t knut.pbsds.net sudo -u flexget flexget";
2023-03-12 05:14:28 +01:00
flexget = "sudo --user=flexget flexget -c /var/lib/flexget/flexget.yml"; # TODO: only applies to nox...
2023-03-04 00:09:57 +01:00
hman = "man -H "; # HTML opened in a browser
tmux = "systemd-run --scope --user tmux"; # detach from ssh scope, surviving logout
2022-10-17 22:40:48 +02:00
2023-03-13 01:15:27 +01:00
#TODO: vpn
2023-12-09 22:54:15 +01:00
# TODO: fix both wayland, and x-forwarding
#clip = "( if command -v wl-copy >/dev/null; then wl-copy --trim-newline --type text/plain; else xclip -sel clip -t text/plain -rmlastnl -i; fi )";
clip = "xclip -sel clip -i -rmlastnl -t text/plain";
2022-10-17 22:40:48 +02:00
2023-03-03 23:33:37 +01:00
# TODO: ps1?
2022-10-17 22:40:48 +02:00
pwd-fqdn = ''echo "$(whoami)@$(hostname -f):$(printf "%q" "$(realpath .)/")"'';
manix-fzf = ''manix "" 2>/dev/null | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix'';
2023-02-24 21:36:30 +01:00
2023-03-03 23:33:37 +01:00
# TODO: move to /run/user/...
2023-02-24 21:36:30 +01:00
nixpkgs-review = ''mkdir -p /dev/shm/nixpkgs-review && ln -sfn /dev/shm/nixpkgs-review $HOME/.cache/nixpkgs-review && nixpkgs-review'';
2023-06-27 21:04:05 +02:00
killall = "killall -v";
2023-12-09 22:54:15 +01:00
bin = "python -c 'import sys; sys.stdout.write(sys.stdin.read().strip())' | curl -is -X POST https://i.kuklef.se/upload -F content=@- -F expiration=10d | grep '^location:' | cut -d' ' -f2-";
2023-12-10 09:46:02 +01:00
2024-01-10 21:42:32 +01:00
denix = "sed -E 's@/nix/store/[^ /]+@@g'";
2022-10-17 22:40:48 +02:00
};
2023-03-03 23:33:37 +01:00
2024-06-06 21:31:22 +02:00
home.enableNixpkgsReleaseCheck = true;
2022-10-17 22:40:48 +02:00
xdg.enable = true;
2023-03-12 05:14:28 +01:00
#TODO: xdg.desktopEntries
2022-10-17 22:40:48 +02:00
2023-02-24 21:36:30 +01:00
/** /
2022-10-17 22:40:48 +02:00
programs.beets = {
enable = true;
settings = {
directory = "/mnt/meconium/beets_preprocessed/data";
#library = "/mnt/meconium/beets_preprocessed/library.db";
library = "${config.xdg.configHome}/beets/library_preprocessed.db";
#directory = "/mnt/meconium/beets_music/library";
#library = "${config.xdg.configHome}/beets/library_meconium.db";
##library = "/mnt/meconium/beets_music/data.db";
};
};
2023-02-24 21:36:30 +01:00
/**/
2022-10-17 22:40:48 +02:00
}