feat: introduce treefmt and fmt all

This commit is contained in:
steveej 2024-11-15 10:17:56 +01:00
parent 80250b0179
commit 5d5282a914
213 changed files with 4967 additions and 4423 deletions

View file

@ -3,20 +3,15 @@
vmPkgsPath,
buildPkgsPath,
nixosConfigPath,
}: let
buildPkgs = import buildPkgsPath {};
vmPkgs' = import vmPkgsPath {};
vmPkgs =
vmPkgs'
// {
runtimeShell = "${vmPkgs'.bash}/${vmPkgs'.bash.shellPath}";
};
}:
let
buildPkgs = import buildPkgsPath { };
vmPkgs' = import vmPkgsPath { };
vmPkgs = vmPkgs' // {
runtimeShell = "${vmPkgs'.bash}/${vmPkgs'.bash.shellPath}";
};
importWithPkgs = {
path,
pkgs,
}: args:
import path (args // {inherit pkgs;});
importWithPkgs = { path, pkgs }: args: import path (args // { inherit pkgs; });
nixosConfig = importWithPkgs {
path = "${nixosConfigPath}";
@ -36,8 +31,10 @@
modules = [
nixosConfig
vmConfig
{virtualisation.useBootLoader = true;}
{ virtualisation.useBootLoader = true; }
];
})
.config;
in {vmWithBootLoaderMixed = vmWithBootLoaderConfigMixed.system.build.vm;}
}).config;
in
{
vmWithBootLoaderMixed = vmWithBootLoaderConfigMixed.system.build.vm;
}

View file

@ -1,9 +1,7 @@
{ pkgs, lib, ... }:
let
in
{
pkgs,
lib,
...
}: let
in {
boot.loader.grub = {
enable = true;
version = 2;
@ -22,13 +20,23 @@ in {
allowDiscards = true;
}
];
fileSystems."/" = {label = "root";};
fileSystems."/" = {
label = "root";
};
fileSystems."/boot" = {label = "boot";};
fileSystems."/boot" = {
label = "boot";
};
boot.tmpOnTmpfs = true;
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
users.extraUsers.root.initialPassword = lib.mkForce "toorroot";
users.mutableUsers = false;