2022-10-17 22:40:48 +02:00
|
|
|
# https://nix-community.github.io/home-manager/options.html
|
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
2023-06-19 15:15:10 +02:00
|
|
|
#nixpkgs.config.allowUnfree = true;
|
2023-03-12 05:14:28 +01:00
|
|
|
home.stateVersion = "22.11"; # TODO: what uses this?
|
2023-03-11 03:39:06 +01:00
|
|
|
|
2022-10-17 22:40:48 +02:00
|
|
|
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/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
|
|
|
|
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
|
2023-03-16 22:29:24 +01:00
|
|
|
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-03-12 05:14:28 +01:00
|
|
|
#rmate-sh # TODO: add to nixpkgs, add to ssh config
|
|
|
|
#remote-exec # TODO: add to nixpkgs
|
2022-10-17 22:40:48 +02:00
|
|
|
|
|
|
|
zip
|
|
|
|
unrar
|
|
|
|
unzip
|
|
|
|
atool
|
|
|
|
p7zip
|
|
|
|
bzip2
|
|
|
|
gzip
|
|
|
|
atool
|
|
|
|
|
|
|
|
dos2unix
|
|
|
|
|
|
|
|
pandoc
|
|
|
|
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
|
2023-06-23 21:45:16 +02:00
|
|
|
nixpkgs-hammering
|
2023-06-29 02:16:16 +02:00
|
|
|
nurl
|
2022-10-17 22:40:48 +02:00
|
|
|
manix
|
2023-02-24 21:36:30 +01:00
|
|
|
comma
|
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-03-11 03:39:06 +01:00
|
|
|
# TODO: wayland
|
2022-10-17 22:40:48 +02:00
|
|
|
clip = "xclip -sel clip -t text/plain -rmlastnl -i";
|
|
|
|
|
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-03-19 04:23:38 +01:00
|
|
|
# TODO: add --nom once released - https://github.com/Mic92/nixpkgs-review/pull/303
|
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-19 15:15:10 +02:00
|
|
|
|
2023-06-27 21:04:05 +02:00
|
|
|
killall = "killall -v";
|
|
|
|
bin = "perl -pe 'chomp' | curl -is -X POST https://i.kuklef.se/upload -F content=@- -F expiration=10d | grep '^location:' | cut -d' ' -f2-";
|
|
|
|
|
2023-06-24 20:23:38 +02:00
|
|
|
#atom = "atom --no-sandbox";
|
|
|
|
atom = "atom --disable-gpu --in-process-gpu --no-sandbox";
|
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;
|
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
|
|
|
|
|
|
|
}
|