1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 04:11:07 +01:00

feat: factor out and spread admin essentials package

This commit is contained in:
2024-01-09 08:00:33 +01:00
parent 899163c847
commit 425a2ad7f5
9 changed files with 95 additions and 69 deletions

View File

@@ -0,0 +1,87 @@
{
pkgs,
niveumPackages,
...
}: {
environment.systemPackages = [
pkgs.htop
pkgs.w3m
pkgs.wget
# ARCHIVE TOOLS
pkgs.unzip
pkgs.unrar
pkgs.p7zip
pkgs.zip
# MONITORS
pkgs.iotop # I/O load monitor
pkgs.iftop # interface bandwidth monitor
pkgs.lsof # list open files
pkgs.psmisc # for killall, pstree
# SHELL
pkgs.fd # better find
pkgs.tree
pkgs.parallel # for parallel, since moreutils shadows task spooler
pkgs.ripgrep # better grep
pkgs.rlwrap
pkgs.progress # display progress bars for pipes
pkgs.file # determine file type
pkgs.gdu # ncurses disk usage (ncdu is broken)
pkgs.rmlint # remove duplicate files
pkgs.jq # json toolkit
pkgs.jless # less(1) for json
pkgs.fq # toolkit for yaml, xml and binaries
pkgs.bc # calculator
pkgs.pari # gp -- better calculator
pkgs.ts
niveumPackages.vimv
niveumPackages.vg
niveumPackages.fkill
niveumPackages.cyberlocker-tools
niveumPackages.untilport
niveumPackages.kpaste
# HARDWARE
pkgs.usbutils # for lsusb
pkgs.pciutils # for lspci
pkgs.lshw # for lshw
];
environment.shellAliases = let
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"
'';
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
'';
where = pkgs.writers.writeDash "where" ''
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
'';
in {
"ß" = "${pkgs.util-linux}/bin/setsid";
nixi = "nix repl '<nixpkgs>'";
take = "source ${take}";
wcd = "source ${wcd}";
where = "source ${where}";
# temporary files and directories
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
# file safety
mv = "mv --interactive";
rm = "rm --interactive";
cp = "cp --interactive";
# colours
cat = "${pkgs.bat}/bin/bat --theme=ansi --style=plain";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
ip = "${pkgs.iproute2}/bin/ip -c";
# systemd
s = "${pkgs.systemd}/bin/systemctl";
us = "${pkgs.systemd}/bin/systemctl --user";
};
}

View File

@@ -98,48 +98,17 @@ in {
{ {
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum"; environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
environment.shellAliases = let environment.shellAliases = let
wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
'';
where = pkgs.writers.writeDash "where" ''
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
'';
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"
'';
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}"; swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
in { in {
"ß" = "${pkgs.util-linux}/bin/setsid";
cat = "${pkgs.bat}/bin/bat --theme=ansi --style=plain";
chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito"; chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
cp = "cp --interactive";
ip = "${pkgs.iproute2}/bin/ip -c";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
mv = "mv --interactive";
nixi = "nix repl '<nixpkgs>'";
ns = "nix-shell --run zsh";
o = "${pkgs.xdg-utils}/bin/xdg-open"; o = "${pkgs.xdg-utils}/bin/xdg-open";
ns = "nix-shell --run zsh";
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out"; pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
rm = "rm --interactive";
s = "${pkgs.systemd}/bin/systemctl";
take = "source ${take}";
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
tmux = "${pkgs.tmux}/bin/tmux -2"; tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura"; zathura = swallow "${pkgs.zathura}/bin/zathura";
us = "${pkgs.systemd}/bin/systemctl --user";
wcd = "source ${wcd}";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM"; im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
where = "source ${where}";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
}; };
@@ -240,6 +209,7 @@ in {
}; };
} }
./android.nix ./android.nix
./admin-essentials.nix
./stylix.nix ./stylix.nix
./alacritty.nix ./alacritty.nix
./backup.nix ./backup.nix

View File

@@ -65,8 +65,6 @@ in {
aria2 aria2
firefox firefox
tdesktop tdesktop
w3m
wget
whois whois
dnsutils dnsutils
# FILE MANAGERS # FILE MANAGERS
@@ -77,44 +75,19 @@ in {
imagemagick imagemagick
exiftool exiftool
nsxiv nsxiv
# ARCHIVE TOOLS
unzip
unrar
p7zip
zip
# MONITORS
htop
iotop # I/O load monitor
iftop # interface bandwidth monitor
lsof # list open files
psmisc # for killall, pstree
# SHELL # SHELL
bat # better cat bat # better cat
fd # better find
file # determine file type
dos2unix dos2unix
genpass # generate passwords genpass # generate passwords
gdu # ncurses disk usage (ncdu is broken)
rmlint # remove duplicate files
gcc gcc
python3Packages.jsonschema # json validation python3Packages.jsonschema # json validation
jq # json toolkit
pup # html toolkit pup # html toolkit
htmlq htmlq
xsv # csv toolkit xsv # csv toolkit
fq # toolkit for yaml, xml and binaries
man-pages man-pages
man-pages-posix man-pages-posix
tree
exfat # to mount windows drives exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
ripgrep # better grep
rlwrap
progress # display progress bars for pipes
# HARDWARE TOOLS # HARDWARE TOOLS
usbutils # for lsusb
pciutils # for lspci
lshw # for lshw
arandr # xrandr for noobs arandr # xrandr for noobs
libnotify # for notify-send libnotify # for notify-send
xclip # clipboard CLI xclip # clipboard CLI
@@ -141,8 +114,6 @@ in {
niveumPackages.hc # print files as qr codes niveumPackages.hc # print files as qr codes
yt-dlp yt-dlp
espeak espeak
bc # calculator
pari # gp -- better calculator
rink # unit converter rink # unit converter
niveumPackages.auc niveumPackages.auc
niveumPackages.cheat-sh niveumPackages.cheat-sh
@@ -165,18 +136,13 @@ in {
niveumPackages.meteo niveumPackages.meteo
niveumPackages.mahlzeit niveumPackages.mahlzeit
niveumPackages.jq-lsp niveumPackages.jq-lsp
niveumPackages.vimv
niveumPackages.swallow # window swallowing niveumPackages.swallow # window swallowing
niveumPackages.literature-quote niveumPackages.literature-quote
jless # less(1) for json
niveumPackages.booksplit niveumPackages.booksplit
niveumPackages.dmenu-randr niveumPackages.dmenu-randr
niveumPackages.dmenu-bluetooth niveumPackages.dmenu-bluetooth
niveumPackages.manual-sort niveumPackages.manual-sort
niveumPackages.dns-sledgehammer niveumPackages.dns-sledgehammer
ts
niveumPackages.vg
niveumPackages.fkill
niveumPackages.wttr niveumPackages.wttr
niveumPackages.unicodmenu niveumPackages.unicodmenu
niveumPackages.emailmenu niveumPackages.emailmenu
@@ -227,9 +193,6 @@ in {
#krebs #krebs
niveumPackages.dic niveumPackages.dic
niveumPackages.cyberlocker-tools
niveumPackages.untilport
niveumPackages.kpaste
config.nur.repos.mic92.ircsink config.nur.repos.mic92.ircsink
(haskellPackages.ghcWithHoogle (hs: [ (haskellPackages.ghcWithHoogle (hs: [

View File

@@ -18,6 +18,7 @@ in {
../../configs/retiolum.nix ../../configs/retiolum.nix
../../configs/sshd.nix ../../configs/sshd.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/admin-essentials.nix
]; ];
niveum.passport = { niveum.passport = {

View File

@@ -29,6 +29,7 @@ in {
../../configs/spacetime.nix ../../configs/spacetime.nix
../../configs/sshd.nix ../../configs/sshd.nix
../../configs/telegram-bots ../../configs/telegram-bots
../../configs/admin-essentials.nix
]; ];
services.restic.backups.niveum = { services.restic.backups.niveum = {

View File

@@ -12,6 +12,7 @@ in {
../../configs/default.nix ../../configs/default.nix
../../configs/battery.nix ../../configs/battery.nix
../../configs/wpa_supplicant.nix ../../configs/wpa_supplicant.nix
../../configs/admin-essentials.nix
]; ];
age.secrets = { age.secrets = {

View File

@@ -11,6 +11,7 @@ in {
../../configs/retiolum.nix ../../configs/retiolum.nix
../../configs/sshd.nix ../../configs/sshd.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/admin-essentials.nix
]; ];
age.secrets = { age.secrets = {

View File

@@ -11,6 +11,7 @@ in {
../../configs/sshd.nix ../../configs/sshd.nix
../../configs/retiolum.nix ../../configs/retiolum.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/admin-essentials.nix
]; ];
age.secrets = { age.secrets = {

View File

@@ -26,6 +26,7 @@ in {
../../configs/tmux.nix ../../configs/tmux.nix
../../configs/wpa_supplicant.nix ../../configs/wpa_supplicant.nix
../../configs/nix.nix ../../configs/nix.nix
../../configs/admin-essentials.nix
]; ];
services.pipewire.systemWide = true; services.pipewire.systemWide = true;