nix-files/hosts/common/programs/assorted.nix

286 lines
7.8 KiB
Nix
Raw Normal View History

2023-09-11 22:31:54 +00:00
{ config, lib, pkgs, ... }:
2023-08-02 21:08:19 +00:00
let
declPackageSet = pkgs: {
package = null;
suggestedPrograms = pkgs;
};
in
{
sane.programs = {
# PACKAGE SETS
2023-08-02 21:08:19 +00:00
"sane-scripts.backup" = declPackageSet [
"sane-scripts.backup-ls"
"sane-scripts.backup-restore"
];
"sane-scripts.bittorrent" = declPackageSet [
"sane-scripts.bt-add"
"sane-scripts.bt-rm"
"sane-scripts.bt-search"
"sane-scripts.bt-show"
];
"sane-scripts.dev" = declPackageSet [
"sane-scripts.dev-cargo-loop"
"sane-scripts.git-init"
];
"sane-scripts.cli" = declPackageSet [
"sane-scripts.deadlines"
"sane-scripts.find-dotfiles"
"sane-scripts.ip-check"
"sane-scripts.ip-reconnect"
"sane-scripts.private-change-passwd"
"sane-scripts.private-do"
"sane-scripts.private-init"
"sane-scripts.private-lock"
"sane-scripts.private-unlock"
"sane-scripts.rcp"
"sane-scripts.reboot"
"sane-scripts.reclaim-boot-space"
"sane-scripts.reclaim-disk-space"
"sane-scripts.secrets-dump"
"sane-scripts.secrets-unlock"
"sane-scripts.secrets-update-keys"
"sane-scripts.shutdown"
"sane-scripts.ssl-dump"
"sane-scripts.sudo-redirect"
"sane-scripts.sync-from-servo"
2023-09-19 15:41:54 +00:00
"sane-scripts.vpn"
2023-08-02 21:08:19 +00:00
"sane-scripts.which"
"sane-scripts.wipe-browser"
2023-10-31 06:54:53 +00:00
"sane-scripts.wipe-flare"
2023-10-24 00:38:41 +00:00
"sane-scripts.wipe-fractal"
2023-08-02 21:08:19 +00:00
];
"sane-scripts.sys-utils" = declPackageSet [
"sane-scripts.ip-port-forward"
"sane-scripts.sync-music"
2023-08-02 21:08:19 +00:00
];
sysadminUtils = declPackageSet [
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
"cryptsetup"
2023-11-06 23:57:48 +00:00
"ddrescue"
"dig"
"dtc" # device tree [de]compiler
"e2fsprogs" # resize2fs
"efibootmgr"
2023-09-18 13:36:58 +00:00
"ethtool"
"fatresize"
"fd"
"file"
# "fwupd"
"gawk"
2023-10-12 01:59:28 +00:00
"gdb" # to debug segfaults
"git"
"gptfdisk" # gdisk
"hdparm"
"htop"
"iftop"
"inetutils" # for telnet
"iotop"
"iptables"
2023-09-18 04:06:00 +00:00
"iw"
"jq"
"killall"
"lsof"
"miniupnpc"
"nano"
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
"neovim"
"netcat"
"nethogs"
"nmap"
"nvme-cli" # nvme
"openssl"
"parted"
"pciutils"
"powertop"
"pstree"
"ripgrep"
"screen"
"smartmontools" # smartctl
"socat"
"strace"
"subversion"
"tcpdump"
"tree"
"usbutils"
"util-linux" # lsblk, lscpu, etc
"wget"
"wirelesstools" # iwlist
2023-11-10 19:28:16 +00:00
"xq" # jq for XML
];
sysadminExtraUtils = declPackageSet [
"backblaze-b2"
"duplicity"
"sane-scripts.backup"
"sqlite" # to debug sqlite3 databases
];
2023-07-03 07:58:02 +00:00
# TODO: split these into smaller groups.
# - moby doesn't want a lot of these.
# - categories like
# - dev?
# - debugging?
consoleUtils = declPackageSet [
"alsaUtils" # for aplay, speaker-test
"binutils-unwrapped" # for strings; though this brings 80MB of unrelated baggage too
# "cdrtools"
"clinfo"
"dmidecode"
"dtrx" # `unar` alternative, "Do The Right eXtraction"
"efivar"
2023-10-10 22:08:58 +00:00
"eza" # a better 'ls'
# "flashrom"
"git" # needed as a user package, for config.
# "gnupg"
# "gocryptfs"
# "gopass"
# "gopass-jsonapi"
"helix" # text editor
"libsecret" # for managing user keyrings. TODO: what needs this? lift into the consumer
"lm_sensors" # for sensors-detect. TODO: what needs this? lift into the consumer
"lshw"
# "memtester"
2023-10-12 01:59:28 +00:00
"mercurial" # hg
"neovim" # needed as a user package, for swap persistence
# "nettools"
# "networkmanager"
# "nixos-generators"
"nmon"
# "node2nix"
# "oathToolkit" # for oathtool
# "ponymix"
"pulsemixer"
2023-11-05 20:02:40 +00:00
"python3-repl"
# "python3Packages.eyeD3" # music tagging
"ripgrep" # needed as a user package so that its user-level config file can be installed
"rsync"
"sane-scripts.bittorrent"
"sane-scripts.cli"
"snapper"
"sops"
"speedtest-cli"
# "ssh-to-age"
"sudo"
# "tageditor" # music tagging
# "unar"
2023-09-11 22:31:54 +00:00
"unzip"
"wireguard-tools"
"xdg-utils" # for xdg-open
# "yarn"
"zsh"
];
2023-07-03 07:58:02 +00:00
desktopConsoleUtils = declPackageSet [
"gh" # MS GitHub cli
"nix-index"
"nixpkgs-review"
"sane-scripts.dev"
"sequoia"
];
consoleMediaUtils = declPackageSet [
"ffmpeg"
"imagemagick"
"sox"
"yt-dlp"
];
2023-07-03 07:58:02 +00:00
tuiApps = declPackageSet [
"aerc" # email client
"msmtp" # sendmail
"offlineimap" # email mailbox sync
"sfeed" # RSS fetcher
"visidata" # TUI spreadsheet viewer/editor
"w3m" # web browser
];
2023-07-03 07:58:02 +00:00
iphoneUtils = declPackageSet [
"ifuse"
"ipfs"
"libimobiledevice"
"sane-scripts.sync-from-iphone"
];
2023-07-03 07:58:02 +00:00
devPkgs = declPackageSet [
2023-10-01 03:47:45 +00:00
"cargo"
"clang"
2023-10-20 23:07:02 +00:00
"lua"
"nodejs"
2023-11-05 20:02:40 +00:00
"patchelf"
2023-10-01 03:47:45 +00:00
"rustc"
"tree-sitter"
];
# INDIVIDUAL PACKAGE DEFINITIONS
2023-11-16 00:36:31 +00:00
animatch.persist.byStore.plaintext = [ ".local/share/Holy Pangolin/Animatch" ]; # game progress
cargo.persist.byStore.plaintext = [ ".cargo" ];
2023-09-30 02:56:31 +00:00
# creds, but also 200 MB of node modules, etc
discord.persist.byStore.private = [ ".config/discord" ];
# `emote` will show a first-run dialog based on what's in this directory.
# mostly, it just keeps a LRU of previously-used emotes to optimize display order.
# TODO: package [smile](https://github.com/mijorus/smile) for probably a better mobile experience.
emote.persist.byStore.plaintext = [ ".local/share/Emote" ];
fluffychat-moby.persist.byStore.plaintext = [ ".local/share/chat.fluffy.fluffychat" ];
2023-07-03 08:03:55 +00:00
2023-09-16 12:44:09 +00:00
font-manager.package = pkgs.font-manager.override {
# build without the "Google Fonts" integration feature, to save closure / avoid webkitgtk_4_0
withWebkit = false;
};
# MS GitHub stores auth token in .config
# TODO: we can populate gh's stuff statically; it even lets us use the same oauth across machines
gh.persist.byStore.private = [ ".config/gh" ];
2023-11-14 03:36:15 +00:00
gnome-2048.persist.byStore.plaintext = [ ".local/share/gnome-2048/scores" ];
"gnome.gnome-maps".persist.byStore.plaintext = [ ".cache/shumate" ];
"gnome.gnome-maps".persist.byStore.private = [ ".local/share/maps-places.json" ];
2023-10-02 04:07:21 +00:00
# actual monero blockchain (not wallet/etc; safe to delete, just slow to regenerate)
# XXX: is it really safe to persist this? it doesn't have info that could de-anonymize if captured?
monero-gui.persist.byStore.plaintext = [ ".bitmonero" ];
mumble.persist.byStore.private = [ ".local/share/Mumble" ];
# settings (electron app)
obsidian.persist.byStore.plaintext = [ ".config/obsidian" ];
2023-11-05 20:02:40 +00:00
python3-repl.package = pkgs.python3.withPackages (ps: with ps; [
requests
]);
shattered-pixel-dungeon.persist.byStore.plaintext = [ ".local/share/.shatteredpixel/shattered-pixel-dungeon" ];
# printer/filament settings
slic3r.persist.byStore.plaintext = [ ".Slic3r" ];
2023-11-13 22:16:56 +00:00
superTux.persist.byStore.plaintext = [ ".local/share/supertux2" ];
tdesktop.persist.byStore.private = [ ".local/share/TelegramDesktop" ];
tokodon.persist.byStore.private = [ ".cache/KDE/tokodon" ];
2023-11-16 20:50:40 +00:00
vvvvvv.persist.byStore.plaintext = [ ".local/share/VVVVVV" ];
whalebird.persist.byStore.private = [ ".config/Whalebird" ];
yarn.persist.byStore.plaintext = [ ".cache/yarn" ];
# zcash coins. safe to delete, just slow to regenerate (10-60 minutes)
zecwallet-lite.persist.byStore.private = [ ".zcash" ];
};
2023-09-11 22:31:54 +00:00
programs.feedbackd = lib.mkIf config.sane.programs.feedbackd.enabled {
enable = true;
};
}