diff --git a/configs/admin-essentials.nix b/configs/admin-essentials.nix new file mode 100644 index 0000000..5faf2ad --- /dev/null +++ b/configs/admin-essentials.nix @@ -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 ''"; + 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"; + }; +} diff --git a/configs/default.nix b/configs/default.nix index bbbc1bc..32c819d 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -98,48 +98,17 @@ in { { environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum"; 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}"; 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"; - 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 ''"; - ns = "nix-shell --run zsh"; o = "${pkgs.xdg-utils}/bin/xdg-open"; + ns = "nix-shell --run zsh"; pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; 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"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; 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"; - where = "source ${where}"; 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 }; @@ -240,6 +209,7 @@ in { }; } ./android.nix + ./admin-essentials.nix ./stylix.nix ./alacritty.nix ./backup.nix diff --git a/configs/packages.nix b/configs/packages.nix index 1f97475..e2fc1dd 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -65,8 +65,6 @@ in { aria2 firefox tdesktop - w3m - wget whois dnsutils # FILE MANAGERS @@ -77,44 +75,19 @@ in { imagemagick exiftool 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 bat # better cat - fd # better find - file # determine file type dos2unix genpass # generate passwords - gdu # ncurses disk usage (ncdu is broken) - rmlint # remove duplicate files gcc python3Packages.jsonschema # json validation - jq # json toolkit pup # html toolkit htmlq xsv # csv toolkit - fq # toolkit for yaml, xml and binaries man-pages man-pages-posix - tree 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 - usbutils # for lsusb - pciutils # for lspci - lshw # for lshw arandr # xrandr for noobs libnotify # for notify-send xclip # clipboard CLI @@ -141,8 +114,6 @@ in { niveumPackages.hc # print files as qr codes yt-dlp espeak - bc # calculator - pari # gp -- better calculator rink # unit converter niveumPackages.auc niveumPackages.cheat-sh @@ -165,18 +136,13 @@ in { niveumPackages.meteo niveumPackages.mahlzeit niveumPackages.jq-lsp - niveumPackages.vimv niveumPackages.swallow # window swallowing niveumPackages.literature-quote - jless # less(1) for json niveumPackages.booksplit niveumPackages.dmenu-randr niveumPackages.dmenu-bluetooth niveumPackages.manual-sort niveumPackages.dns-sledgehammer - ts - niveumPackages.vg - niveumPackages.fkill niveumPackages.wttr niveumPackages.unicodmenu niveumPackages.emailmenu @@ -227,9 +193,6 @@ in { #krebs niveumPackages.dic - niveumPackages.cyberlocker-tools - niveumPackages.untilport - niveumPackages.kpaste config.nur.repos.mic92.ircsink (haskellPackages.ghcWithHoogle (hs: [ diff --git a/systems/ful/configuration.nix b/systems/ful/configuration.nix index 79d0a8f..ddba201 100644 --- a/systems/ful/configuration.nix +++ b/systems/ful/configuration.nix @@ -18,6 +18,7 @@ in { ../../configs/retiolum.nix ../../configs/sshd.nix ../../configs/nix.nix + ../../configs/admin-essentials.nix ]; niveum.passport = { diff --git a/systems/makanek/configuration.nix b/systems/makanek/configuration.nix index 4b10be2..ac0179b 100644 --- a/systems/makanek/configuration.nix +++ b/systems/makanek/configuration.nix @@ -29,6 +29,7 @@ in { ../../configs/spacetime.nix ../../configs/sshd.nix ../../configs/telegram-bots + ../../configs/admin-essentials.nix ]; services.restic.backups.niveum = { diff --git a/systems/manakish/configuration.nix b/systems/manakish/configuration.nix index 1cc3d88..00e547a 100644 --- a/systems/manakish/configuration.nix +++ b/systems/manakish/configuration.nix @@ -12,6 +12,7 @@ in { ../../configs/default.nix ../../configs/battery.nix ../../configs/wpa_supplicant.nix + ../../configs/admin-essentials.nix ]; age.secrets = { diff --git a/systems/tabula/configuration.nix b/systems/tabula/configuration.nix index f3d5614..e9a2a78 100644 --- a/systems/tabula/configuration.nix +++ b/systems/tabula/configuration.nix @@ -11,6 +11,7 @@ in { ../../configs/retiolum.nix ../../configs/sshd.nix ../../configs/nix.nix + ../../configs/admin-essentials.nix ]; age.secrets = { diff --git a/systems/tahina/configuration.nix b/systems/tahina/configuration.nix index fde04b7..e044d8b 100644 --- a/systems/tahina/configuration.nix +++ b/systems/tahina/configuration.nix @@ -11,6 +11,7 @@ in { ../../configs/sshd.nix ../../configs/retiolum.nix ../../configs/nix.nix + ../../configs/admin-essentials.nix ]; age.secrets = { diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 54ba2d2..0db05f9 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -26,6 +26,7 @@ in { ../../configs/tmux.nix ../../configs/wpa_supplicant.nix ../../configs/nix.nix + ../../configs/admin-essentials.nix ]; services.pipewire.systemWide = true;