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

fix: use pkgs.system

This commit is contained in:
2024-03-14 18:18:12 +01:00
parent 0ee765de37
commit 7d51ce0850
2 changed files with 80 additions and 75 deletions

View File

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

View File

@@ -1,8 +1,6 @@
{ {
pkgs, pkgs,
lib,
inputs, inputs,
system ? "x86_64-linux",
... ...
}: let }: let
inherit (import ../lib) kieran ignorePaths; inherit (import ../lib) kieran ignorePaths;
@@ -19,7 +17,7 @@ in {
pkgs.gitstats pkgs.gitstats
pkgs.patch pkgs.patch
pkgs.patchutils pkgs.patchutils
inputs.self.packages.${system}.git-preview inputs.self.packages.${pkgs.system}.git-preview
]; ];
environment.shellAliases = { environment.shellAliases = {