config/users/pbsds/home/default.nix

144 lines
3.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, ... }:
{
imports = [
2023-03-03 23:33:37 +01:00
./profiles/bat.nix
./profiles/git.nix
./profiles/gtk.nix
./profiles/micro.nix
2023-03-04 00:09:57 +01:00
./profiles/mpv.nix
./profiles/shell.nix
2023-03-03 23:33:37 +01:00
./profiles/ssh.nix
./profiles/tmate.nix
2023-02-24 21:36:30 +01:00
];
2022-10-17 22:40:48 +02:00
nixpkgs.config.allowUnfree = true;
2023-03-04 00:09:57 +01:00
home.stateVersion = "22.11";
2022-10-17 22:40:48 +02:00
programs.bash.initExtra = ''
if [ "$COLORTERM" = "truecolor" ] || [ "$TERM" == "xterm" ]; then
export TERM=xterm-256color
export MICRO_TRUECOLOR=1
fi
2023-03-03 23:33:37 +01:00
# remote-exec
2023-03-07 01:02:57 +01:00
if command -v remote >/dev/null && 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
2022-10-17 22:40:48 +02:00
function atom_nix {
nix-shell -p atom --run "atom $(printf "%q " "$@") --in-process-gpu --no-sandbox"
}
'';
# TODO: split ^
home.packages = with pkgs; [
xclip
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
aspell
aspellDicts.en
aspellDicts.nb
dos2unix
pandoc
graphviz
vgmstream
gallery-dl
yt-dlp
2023-02-24 21:36:30 +01:00
youtube-dl
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
mesa-demos
cage
librespeed-cli
2023-02-24 21:36:30 +01:00
cachix
2022-10-17 22:40:48 +02:00
nix-template
nix-output-monitor
nixpkgs-review
manix
2023-02-24 21:36:30 +01:00
comma
2022-10-17 22:40:48 +02:00
(python3.withPackages (python-packages: with python-packages; [
requests
numpy
scipy
ptpython
poetry
rich
matplotlib
more-itertools
toml
pyyaml
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";
flexget = "sudo --user=flexget flexget -c /var/lib/flexget/flexget.yml";
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
# TODO: wayland detection
clip = "xclip -sel clip -t text/plain -rmlastnl -i";
python = "ptpython"; # this has too many problems...
cpython = "python";
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 .)/")"'';
http-server = "${pkgs.python3}/bin/python -m http.server";
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'';
2022-10-17 22:40:48 +02:00
};
2023-03-03 23:33:37 +01:00
2022-10-17 22:40:48 +02:00
programs.nix-index.enable = true;
xdg.enable = true;
#xdg.desktopEntries
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
}