1
0
mirror of https://github.com/kmein/niveum synced 2026-03-22 04:41: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,12 +2,12 @@
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.htop
pkgs.w3m pkgs.w3m
pkgs.wget pkgs.wget
@@ -44,7 +44,8 @@ in {
niveumPackages.kpaste niveumPackages.kpaste
# HARDWARE # HARDWARE
pkgs.pciutils # for lspci pkgs.pciutils # for lspci
] ++ lib.optionals (!darwin) [ ]
++ lib.optionals (!darwin) [
pkgs.usbutils # for lsusb pkgs.usbutils # for lsusb
pkgs.lshw # for lshw pkgs.lshw # for lshw
pkgs.iotop # I/O load monitor pkgs.iotop # I/O load monitor
@@ -65,7 +66,8 @@ 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>'"; nixi = "nix repl '<nixpkgs>'";
take = "source ${take}"; take = "source ${take}";
wcd = "source ${wcd}"; wcd = "source ${wcd}";
@@ -83,7 +85,11 @@ in {
ls = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso"; ls = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso";
ll = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso -l"; ll = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso -l";
la = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso --almost-all -l"; la = "${pkgs.coreutils}/bin/ls --color=auto --time-style=long-iso --almost-all -l";
} // (if darwin then {} else { }
// (
if darwin
then {}
else {
"ß" = "${pkgs.util-linux}/bin/setsid"; "ß" = "${pkgs.util-linux}/bin/setsid";
ip = "${pkgs.iproute2}/bin/ip -c"; ip = "${pkgs.iproute2}/bin/ip -c";
# systemd # systemd
@@ -91,5 +97,6 @@ in {
us = "${pkgs.systemd}/bin/systemctl --user"; us = "${pkgs.systemd}/bin/systemctl --user";
j = "${pkgs.systemd}/bin/journalctl"; j = "${pkgs.systemd}/bin/journalctl";
uj = "${pkgs.systemd}/bin/journalctl --user"; 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 = {