programs: use the `declPackageSet` helper

This commit is contained in:
Colin 2023-08-02 21:11:49 +00:00
parent 44059b34c7
commit dcf97b70e1
4 changed files with 138 additions and 168 deletions

View File

@ -54,172 +54,148 @@ in
];
sysadminUtils = {
package = null;
suggestedPrograms = [
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
"cryptsetup"
"dig"
"efibootmgr"
"fatresize"
"fd"
"file"
"gawk"
"git"
"gptfdisk"
"hdparm"
"htop"
"iftop"
"inetutils" # for telnet
"iotop"
"iptables"
"jq"
"killall"
"lsof"
"miniupnpc"
"nano"
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
"neovim"
"netcat"
"nethogs"
"nmap"
"openssl"
"parted"
"pciutils"
"powertop"
"pstree"
"ripgrep"
"screen"
"smartmontools"
"socat"
"strace"
"subversion"
"tcpdump"
"tree"
"usbutils"
"wget"
"wirelesstools" # iwlist
];
};
sysadminExtraUtils = {
package = null;
suggestedPrograms = [
"backblaze-b2"
"duplicity"
"sane-scripts.backup"
"sqlite" # to debug sqlite3 databases
];
};
sysadminUtils = declPackageSet [
"btrfs-progs"
"cacert.unbundled" # some services require unbundled /etc/ssl/certs
"cryptsetup"
"dig"
"efibootmgr"
"fatresize"
"fd"
"file"
"gawk"
"git"
"gptfdisk"
"hdparm"
"htop"
"iftop"
"inetutils" # for telnet
"iotop"
"iptables"
"jq"
"killall"
"lsof"
"miniupnpc"
"nano"
# "ncdu" # ncurses disk usage. doesn't cross compile (zig)
"neovim"
"netcat"
"nethogs"
"nmap"
"openssl"
"parted"
"pciutils"
"powertop"
"pstree"
"ripgrep"
"screen"
"smartmontools"
"socat"
"strace"
"subversion"
"tcpdump"
"tree"
"usbutils"
"wget"
"wirelesstools" # iwlist
];
sysadminExtraUtils = declPackageSet [
"backblaze-b2"
"duplicity"
"sane-scripts.backup"
"sqlite" # to debug sqlite3 databases
];
# TODO: split these into smaller groups.
# - moby doesn't want a lot of these.
# - categories like
# - dev?
# - debugging?
consoleUtils = {
package = null;
suggestedPrograms = [
"alsaUtils" # for aplay, speaker-test
# "cdrtools"
"clinfo"
"dmidecode"
"dtrx" # `unar` alternative, "Do The Right eXtraction"
"efivar"
# "flashrom"
"fwupd"
"git" # needed as a user package, for config.
# "gnupg"
# "gocryptfs"
# "gopass"
# "gopass-jsonapi"
"helix" # text editor
"kitty" # TODO: move to GUI, but `ssh servo` from kitty sets `TERM=xterm-kitty` in the remove and breaks things
"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"
"neovim" # needed as a user package, for swap persistence
# "nettools"
# "networkmanager"
# "nixos-generators"
"nmon"
# "node2nix"
# "oathToolkit" # for oathtool
# "ponymix"
"pulsemixer"
"python3"
# "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"
"wireguard-tools"
"xdg-terminal-exec"
"xdg-utils" # for xdg-open
# "yarn"
"zsh"
];
};
consoleUtils = declPackageSet [
"alsaUtils" # for aplay, speaker-test
# "cdrtools"
"clinfo"
"dmidecode"
"dtrx" # `unar` alternative, "Do The Right eXtraction"
"efivar"
# "flashrom"
"fwupd"
"git" # needed as a user package, for config.
# "gnupg"
# "gocryptfs"
# "gopass"
# "gopass-jsonapi"
"helix" # text editor
"kitty" # TODO: move to GUI, but `ssh servo` from kitty sets `TERM=xterm-kitty` in the remove and breaks things
"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"
"neovim" # needed as a user package, for swap persistence
# "nettools"
# "networkmanager"
# "nixos-generators"
"nmon"
# "node2nix"
# "oathToolkit" # for oathtool
# "ponymix"
"pulsemixer"
"python3"
# "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"
"wireguard-tools"
"xdg-terminal-exec"
"xdg-utils" # for xdg-open
# "yarn"
"zsh"
];
desktopConsoleUtils = {
package = null;
suggestedPrograms = [
"gh" # MS GitHub cli
"nix-index"
"nixpkgs-review"
"sane-scripts.dev"
"sequoia"
];
};
desktopConsoleUtils = declPackageSet [
"gh" # MS GitHub cli
"nix-index"
"nixpkgs-review"
"sane-scripts.dev"
"sequoia"
];
consoleMediaUtils = {
package = null;
suggestedPrograms = [
"ffmpeg"
"imagemagick"
"sox"
"yt-dlp"
];
};
consoleMediaUtils = declPackageSet [
"ffmpeg"
"imagemagick"
"sox"
"yt-dlp"
];
tuiApps = {
package = null;
suggestedPrograms = [
"aerc" # email client
"msmtp" # sendmail
"offlineimap" # email mailbox sync
"sfeed" # RSS fetcher
"visidata" # TUI spreadsheet viewer/editor
"w3m" # web browser
];
};
tuiApps = declPackageSet [
"aerc" # email client
"msmtp" # sendmail
"offlineimap" # email mailbox sync
"sfeed" # RSS fetcher
"visidata" # TUI spreadsheet viewer/editor
"w3m" # web browser
];
iphoneUtils = {
package = null;
suggestedPrograms = [
"ifuse"
"ipfs"
"libimobiledevice"
"sane-scripts.sync-from-iphone"
];
};
iphoneUtils = declPackageSet [
"ifuse"
"ipfs"
"libimobiledevice"
"sane-scripts.sync-from-iphone"
];
devPkgs = {
package = null;
suggestedPrograms = [
"clang"
"nodejs"
"tree-sitter"
];
};
devPkgs = declPackageSet [
"clang"
"nodejs"
"tree-sitter"
];
# INDIVIDUAL PACKAGE DEFINITIONS

View File

@ -233,6 +233,7 @@ in
(lib.mapAttrs' (pkgName: _pkg: { name = "libsForQt5.${pkgName}"; value = {}; }) pkgs.libsForQt5)
(lib.mapAttrs' (pkgName: _pkg: { name = "plasma5Packages.${pkgName}"; value = {}; }) pkgs.plasma5Packages)
(lib.mapAttrs' (pkgName: _pkg: { name = "python3Packages.${pkgName}"; value = {}; }) pkgs.python3Packages)
(lib.mapAttrs' (pkgName: _pkg: { name = "sane-scripts.${pkgName}"; value = {}; }) pkgs.sane-scripts)
(lib.mapAttrs' (pkgName: _pkg: { name = "sway-contrib.${pkgName}"; value = {}; }) pkgs.sway-contrib)
];
}

View File

@ -211,16 +211,10 @@ let
src = ./src;
};
};
in
symlinkJoin {
name = "sane-scripts";
paths = lib.attrValues sane-bin;
passthru = sane-bin // {
lib = sane-lib;
};
meta = {
description = "collection of scripts associated with sane systems";
homepage = "https://git.uninsane.org";
platforms = lib.platforms.all;
in sane-bin // {
lib = sane-lib;
all = symlinkJoin {
name = "sane-scripts";
paths = lib.attrValues sane-bin;
};
}

View File

@ -44,8 +44,7 @@ let
mpv-uosc-latest = callPackage ./additional/mpv-uosc-latest { };
mx-sanebot = callPackage ./additional/mx-sanebot { };
rtl8723cs-firmware = callPackage ./additional/rtl8723cs-firmware { };
# TODO: use `recurseIntoAttrs` ?
sane-scripts = callPackage ./additional/sane-scripts { };
sane-scripts = lib.recurseIntoAttrs (callPackage ./additional/sane-scripts { });
static-nix-shell = callPackage ./additional/static-nix-shell { };
sublime-music-mobile = callPackage ./additional/sublime-music-mobile { };
sxmo-utils = callPackage ./additional/sxmo-utils { };