config/users/pbsds/home/default.nix

170 lines
4.1 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
}
2024-07-31 01:57:47 +02:00
2024-08-11 00:10:10 +02:00
if [[ -n "''${SSH_CLIENT-}" || -n "''${SSH_TTY-}" || -z "''${WAYLAND_DISPLAY-}" ]]; then
alias clip="xclip -sel clip -i -rmlastnl -t text/plain";
else
alias clip="wl-copy --trim-newline --type text/plain";
fi
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
2024-07-11 03:24:53 +02:00
visidata
2022-10-17 22:40:48 +02:00
gallery-dl
2023-03-12 05:14:28 +01:00
yt-dlp
2024-07-11 03:24:53 +02:00
vgmstream
2022-10-17 22:40:48 +02:00
ffmpeg-full
2024-08-11 00:10:10 +02:00
/* (pkgs.termsvg or pkgs.unstable.termsvg) */
2022-10-17 22:40:48 +02:00
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
/* cachix */
/* nix-template */
2022-10-17 22:40:48 +02:00
nix-output-monitor
(pkgs.nix-inspect or unstable.nix-inspect)
2024-08-18 03:16:17 +02:00
(pkgs.nix-btm or unstable.nix-btm)
2024-07-31 01:57:47 +02:00
unstable.nixpkgs-review
2024-03-26 20:52:49 +01:00
unstable.nixpkgs-hammering
unstable.nix-update
unstable.nix-init
unstable.deadnix
unstable.statix
/* unstable.nixtract */
unstable.nixfmt-rfc-style
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
#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-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'";
2024-08-22 22:31:36 +02:00
ns = "nix-shell -p";
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
}