From 4501f20a38154d3ac3f92b9f70264e24406b5f2d Mon Sep 17 00:00:00 2001 From: Ari Gato Date: Tue, 2 Jul 2024 15:58:26 +0200 Subject: [PATCH] .: chore: fmt, clean-up warnings reported by nixd --- modules/gaming.nix | 2 +- nixos/amanojaku/default.nix | 8 +--- nixos/kamaitachi/default.nix | 4 +- nixos/khas/default.nix | 2 +- nixos/khas/hardware-configuration.nix | 2 +- nixos/microlith/default.nix | 2 +- nixos/microlith/hardware-configuration.nix | 2 +- nixos/scylla/hardware-configuration.nix | 2 +- nixos/tsukumogami/default.nix | 43 ++++++++++------------ nixos/zorigami/hardware.nix | 2 +- pkgs/linux_rpi/linux-rpi.nix | 3 +- pkgs/minecraft-overviewer.nix | 37 +++++++++---------- pkgs/nix-top/default.nix | 29 +++++---------- pkgs/raspberrypi/default.nix | 9 ++--- pkgs/rpi5-arm-tf.nix | 2 +- pkgs/rpi5-edk2-tools.nix | 3 +- pkgs/rpi5-uefi-bin.nix | 4 +- pkgs/rpi5-uefi.nix | 4 +- 18 files changed, 67 insertions(+), 93 deletions(-) diff --git a/modules/gaming.nix b/modules/gaming.nix index 3ef0922..5362cd8 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +_: { programs.steam = { enable = true; remotePlay.openFirewall = true; diff --git a/nixos/amanojaku/default.nix b/nixos/amanojaku/default.nix index 76e8114..2cf8433 100644 --- a/nixos/amanojaku/default.nix +++ b/nixos/amanojaku/default.nix @@ -4,12 +4,8 @@ networking.hostName = "amanojaku"; deployment.tags = [ "reachable-home" ]; - imports = with inputs.self.nixosModules; [ - graphical - laptop - - inputs.jovian-nixos.nixosModules.default - ]; + imports = [ inputs.jovian-nixos.nixosModules.default ] + ++ (with inputs.self.nixosModules; [ graphical laptop ]); boot.uefi.enable = true; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_jovian; diff --git a/nixos/kamaitachi/default.nix b/nixos/kamaitachi/default.nix index 7254eef..53a5704 100644 --- a/nixos/kamaitachi/default.nix +++ b/nixos/kamaitachi/default.nix @@ -37,9 +37,9 @@ in { deployment.buildOnTarget = lib.mkForce false; deployment.tags = [ "reachable-home" ]; - imports = with inputs.self.nixosModules; [ + imports = [ "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image.nix" - common + inputs.self.nixosModules.common ]; # don't want to pull in all of installer stuff, so we need to copy some things from sd-image-aarch64.nix: diff --git a/nixos/khas/default.nix b/nixos/khas/default.nix index a3942f4..7f22e5a 100644 --- a/nixos/khas/default.nix +++ b/nixos/khas/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, inputs, ... }: { networking.hostName = "khas"; diff --git a/nixos/khas/hardware-configuration.nix b/nixos/khas/hardware-configuration.nix index 0852d92..5c2f3a7 100644 --- a/nixos/khas/hardware-configuration.nix +++ b/nixos/khas/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +_: { hardware.enableAllFirmware = true; diff --git a/nixos/microlith/default.nix b/nixos/microlith/default.nix index d7c5267..dcc7e1f 100644 --- a/nixos/microlith/default.nix +++ b/nixos/microlith/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, ... }: +{ config, inputs, ... }: { networking.hostName = "microlith"; diff --git a/nixos/microlith/hardware-configuration.nix b/nixos/microlith/hardware-configuration.nix index 8c2a8c9..e9df5cd 100644 --- a/nixos/microlith/hardware-configuration.nix +++ b/nixos/microlith/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, ... }: +_: { hardware.enableAllFirmware = true; diff --git a/nixos/scylla/hardware-configuration.nix b/nixos/scylla/hardware-configuration.nix index de2c5fb..0a13f24 100644 --- a/nixos/scylla/hardware-configuration.nix +++ b/nixos/scylla/hardware-configuration.nix @@ -1,7 +1,7 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/nixos/tsukumogami/default.nix b/nixos/tsukumogami/default.nix index 3d5fd74..46114ee 100644 --- a/nixos/tsukumogami/default.nix +++ b/nixos/tsukumogami/default.nix @@ -13,9 +13,9 @@ in { deployment.buildOnTarget = lib.mkForce false; deployment.tags = [ "reachable-hs" ]; - imports = with inputs.self.nixosModules; [ + imports = [ "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image.nix" - common + inputs.self.nixosModules.common ]; # don't want to pull in all of installer stuff, so we need to copy some things from sd-image-aarch64.nix: @@ -172,8 +172,18 @@ in { # diet boot.binfmt.emulatedSystems = lib.mkForce [ ]; - environment.systemPackages = with pkgs; - lib.mkForce [ + environment.systemPackages = [ + # avoid warnings + (pkgs.glibcLocales.override { + allLocales = false; + locales = [ "en_US.UTF-8/UTF-8" "en_CA.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ]; + }) + + # strictly unnecessary + (pkgs.v4l-utils.override { withGUI = false; }) + ] ++ (with pkgs; + # lib.mkForce + [ # strictly required coreutils nix @@ -183,26 +193,8 @@ in { zsh bashInteractive - # reaaaaally useful (on-screen keyboard) - maliit-keyboard - maliit-framework - squeekboard - - # we include these anyway - wlr-randr - chromium - # avoid warnings gnugrep - (glibcLocales.override { - allLocales = false; - locales = [ - "en_US.UTF-8/UTF-8" - "en_CA.UTF-8/UTF-8" - "en_DK.UTF-8/UTF-8" - "pl_PL.UTF-8/UTF-8" - ]; - }) # nice-to-haves procps @@ -213,13 +205,16 @@ in { usbutils neovim tmux + uhubctl + libraspberrypi + raspberrypi-eeprom # strictly unnecessary mpv alsa-utils + bluez pipewire - (v4l-utils.override { withGUI = false; }) - ]; + ]); programs.nix-index.enable = lib.mkForce false; services.journald.extraConfig = '' Storage=volatile diff --git a/nixos/zorigami/hardware.nix b/nixos/zorigami/hardware.nix index 9d0d944..f4be55b 100644 --- a/nixos/zorigami/hardware.nix +++ b/nixos/zorigami/hardware.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/pkgs/linux_rpi/linux-rpi.nix b/pkgs/linux_rpi/linux-rpi.nix index 712f152..886142e 100644 --- a/pkgs/linux_rpi/linux-rpi.nix +++ b/pkgs/linux_rpi/linux-rpi.nix @@ -1,5 +1,4 @@ -{ stdenv, lib, buildPackages, fetchFromGitHub, perl, buildLinux, rpiVersion, ... -}@args: +{ stdenv, lib, fetchFromGitHub, buildLinux, rpiVersion, ... }@args: let # NOTE: raspberrypifw & raspberryPiWirelessFirmware should be updated with this diff --git a/pkgs/minecraft-overviewer.nix b/pkgs/minecraft-overviewer.nix index b7b4f5c..63fdcfa 100644 --- a/pkgs/minecraft-overviewer.nix +++ b/pkgs/minecraft-overviewer.nix @@ -1,28 +1,27 @@ { fetchFromGitHub, pkgs, buildPythonPackage, python3Packages, python3, ... }: -buildPythonPackage rec { +buildPythonPackage { pname = "Minecraft-Overviewer"; version = "2024-03-15"; format = "other"; - propagatedBuildInputs = with pkgs; - [ pipreqs ] ++ (with python3Packages; [ - pillow_with_headers - altgraph - certifi - charset-normalizer - docopt - idna - importlib-metadata - nbtlib - numpy - packaging - pefile - requests - urllib3 - yarg - zipp - ]); + propagatedBuildInputs = [ pkgs.pipreqs ] ++ (with python3Packages; [ + pillow_with_headers + altgraph + certifi + charset-normalizer + docopt + idna + importlib-metadata + nbtlib + numpy + packaging + pefile + requests + urllib3 + yarg + zipp + ]); buildInputs = with python3Packages; [ setuptools ]; diff --git a/pkgs/nix-top/default.nix b/pkgs/nix-top/default.nix index 3bef77e..0e6a7eb 100644 --- a/pkgs/nix-top/default.nix +++ b/pkgs/nix-top/default.nix @@ -1,32 +1,21 @@ -{ stdenv -, lib -, fetchFromGitHub -, ruby -, makeWrapper -, getent # /etc/passwd -, ncurses # tput -, binutils-unwrapped # strings -, coreutils -, findutils -}: +{ stdenv, lib, ruby, makeWrapper, getent # /etc/passwd +, ncurses # tput +, binutils-unwrapped # strings +, coreutils, findutils }: # No gems used, so mkDerivation is fine. let - additionalPath = lib.makeBinPath [ getent ncurses binutils-unwrapped coreutils findutils ]; -in -stdenv.mkDerivation rec { + additionalPath = + lib.makeBinPath [ getent ncurses binutils-unwrapped coreutils findutils ]; +in stdenv.mkDerivation { pname = "nix-top"; version = "0.3.0"; src = ./.; - nativeBuildInputs = [ - makeWrapper - ]; + nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ - ruby - ]; + buildInputs = [ ruby ]; installPhase = '' mkdir -p $out/libexec/nix-top diff --git a/pkgs/raspberrypi/default.nix b/pkgs/raspberrypi/default.nix index fb98be2..6614448 100644 --- a/pkgs/raspberrypi/default.nix +++ b/pkgs/raspberrypi/default.nix @@ -1,6 +1,6 @@ -{ lib, stdenvNoCC, fetchFromGitHub }: +{ stdenvNoCC, fetchFromGitHub }: -stdenvNoCC.mkDerivation rec { +stdenvNoCC.mkDerivation { # NOTE: this should be updated with linux_rpi pname = "raspberrypi-firmware"; # raspberrypi/firmware no longers tag the releases. However, since each commit @@ -24,12 +24,9 @@ stdenvNoCC.mkDerivation rec { dontBuild = true; dontFixup = true; - meta = with lib; { + meta = { description = "Firmware for the Raspberry Pi board"; homepage = "https://github.com/raspberrypi/firmware"; - license = - licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom - maintainers = with maintainers; [ dezgeg ]; # Hash mismatch on source, mystery. # Maybe due to https://github.com/NixOS/nix/issues/847 broken = stdenvNoCC.isDarwin; diff --git a/pkgs/rpi5-arm-tf.nix b/pkgs/rpi5-arm-tf.nix index eadf8ba..6e7eea6 100644 --- a/pkgs/rpi5-arm-tf.nix +++ b/pkgs/rpi5-arm-tf.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, runCommand, buildPackages, pkgsCross, openssl }: +{ lib, stdenv, fetchFromGitHub, buildPackages, pkgsCross }: stdenv.mkDerivation rec { name = "arm-trusted-firmware-rpi5"; diff --git a/pkgs/rpi5-edk2-tools.nix b/pkgs/rpi5-edk2-tools.nix index b5efd16..cf2d2db 100644 --- a/pkgs/rpi5-edk2-tools.nix +++ b/pkgs/rpi5-edk2-tools.nix @@ -1,5 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, openssl, buildPackages, runCommand, clangStdenv -, fetchpatch, libuuid, python3 }: +{ lib, stdenv, fetchFromGitHub, buildPackages, runCommand, libuuid }: let srcWithVendoring = fetchFromGitHub { diff --git a/pkgs/rpi5-uefi-bin.nix b/pkgs/rpi5-uefi-bin.nix index 7d85998..772ea97 100644 --- a/pkgs/rpi5-uefi-bin.nix +++ b/pkgs/rpi5-uefi-bin.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchzip }: +{ stdenv, fetchzip }: let version = "v0.3"; in stdenv.mkDerivation { @@ -21,5 +21,5 @@ in stdenv.mkDerivation { runHook postInstall ''; - meta = with lib; { description = "EDK2 port for raspberry pi 5"; }; + meta = { description = "EDK2 port for raspberry pi 5"; }; } diff --git a/pkgs/rpi5-uefi.nix b/pkgs/rpi5-uefi.nix index e285edd..3de24d1 100644 --- a/pkgs/rpi5-uefi.nix +++ b/pkgs/rpi5-uefi.nix @@ -1,5 +1,5 @@ -{ lib, stdenv, openssl, pkgsCross, buildPackages, runCommand, rpi5-arm-tf -, rpi5-edk2-tools, libuuid, python3, bc, util-linux, nasm, acpica-tools }: +{ stdenv, buildPackages, rpi5-arm-tf, rpi5-edk2-tools, bc, util-linux, nasm +, acpica-tools }: let pythonEnv = buildPackages.python3.withPackages (ps: [ ps.tkinter ]); in stdenv.mkDerivation rec {