chore: format repo using treefmt-nix and nixfmt-rfc-style

This commit is contained in:
Andre
2025-06-04 12:11:03 -04:00
parent fc7c471412
commit 51e51e6014
266 changed files with 3721 additions and 2733 deletions

View File

@@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
cfg = config.hardware.visionfive2;
in
@@ -34,15 +39,19 @@ in
config = {
system.build = {
opensbi = (pkgs.callPackage ./opensbi.nix {}).overrideAttrs (f: p: {
src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src;
patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or []);
});
opensbi = (pkgs.callPackage ./opensbi.nix { }).overrideAttrs (
_f: p: {
src = if cfg.opensbi.src != null then cfg.opensbi.src else p.src;
patches = if cfg.opensbi.patches != null then cfg.opensbi.patches else (p.patches or [ ]);
}
);
uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (f: p: {
src = if cfg.uboot.src != null then cfg.uboot.src else p.src;
patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or []);
});
uboot = (pkgs.callPackage ./uboot.nix { inherit (config.system.build) opensbi; }).overrideAttrs (
_f: p: {
src = if cfg.uboot.src != null then cfg.uboot.src else p.src;
patches = if cfg.uboot.patches != null then cfg.uboot.patches else (p.patches or [ ]);
}
);
updater-flash = pkgs.writeShellApplication {
name = "visionfive2-firmware-update-flash";

View File

@@ -1,4 +1,9 @@
{ config, pkgs, modulesPath, ... }:
{
config,
pkgs,
modulesPath,
...
}:
{
imports = [
"${modulesPath}/profiles/base.nix"
@@ -7,8 +12,7 @@
];
sdImage = {
imageName =
"${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive2.img";
imageName = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}-starfive-visionfive2.img";
# Overridden by postBuildCommands
populateFirmwareCommands = "";

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation (finalAttrs: {
stdenv.mkDerivation (_finalAttrs: {
pname = "spi_tool";
version = "0x01010101";
src = fetchFromGitHub {

View File

@@ -1,5 +1,6 @@
{ buildUBoot
, opensbi
{
buildUBoot,
opensbi,
}:
buildUBoot {