chore: nixfmt *

This commit is contained in:
steveej 2022-10-31 11:04:38 +01:00
parent dc761a5271
commit d039179898
161 changed files with 2688 additions and 3024 deletions

View file

@ -1,32 +1,35 @@
{ system ? builtins.currentSystem
, vmPkgsPath
, buildPkgsPath
, nixosConfigPath
}:
{ system ? builtins.currentSystem, vmPkgsPath, buildPkgsPath, nixosConfigPath }:
let
buildPkgs = import buildPkgsPath {};
vmPkgs'= import vmPkgsPath {};
buildPkgs = import buildPkgsPath { };
vmPkgs' = import vmPkgsPath { };
vmPkgs = vmPkgs' // {
runtimeShell = "${vmPkgs'.bash}/${vmPkgs'.bash.shellPath}";
};
importWithPkgs = { path, pkgs }: args: import path (args // { inherit pkgs; });
nixosConfig = importWithPkgs { path = "${nixosConfigPath}"; pkgs = vmPkgs; };
vmConfig = importWithPkgs { path = "${buildPkgsPath}/nixos/modules/virtualisation/qemu-vm.nix"; pkgs = vmPkgs; };
evalConfig = importWithPkgs { path = "${vmPkgsPath}/nixos/lib/eval-config.nix"; pkgs = null; };
importWithPkgs = { path, pkgs }:
args:
import path (args // { inherit pkgs; });
nixosConfig = importWithPkgs {
path = "${nixosConfigPath}";
pkgs = vmPkgs;
};
vmConfig = importWithPkgs {
path = "${buildPkgsPath}/nixos/modules/virtualisation/qemu-vm.nix";
pkgs = vmPkgs;
};
evalConfig = importWithPkgs {
path = "${vmPkgsPath}/nixos/lib/eval-config.nix";
pkgs = null;
};
vmWithBootLoaderConfigMixed = (evalConfig {
modules = [
nixosConfig
vmConfig
{
virtualisation.useBootLoader = true;
}
{ virtualisation.useBootLoader = true; }
];
}).config;
in {
vmWithBootLoaderMixed = vmWithBootLoaderConfigMixed.system.build.vm;
}
in { vmWithBootLoaderMixed = vmWithBootLoaderConfigMixed.system.build.vm; }

View file

@ -1,9 +1,7 @@
{ pkgs, lib, ... }:
let
in
{
in {
boot.loader.grub = {
enable = true;
version = 2;
@ -14,25 +12,21 @@ in
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.enable = true;
boot.initrd.luks.devices = [ {
name = "crypt";
device = "/dev/disk/uuid/463d886d-7dfe-421b-8cef-f9af3a3fa09d";
preLVM = true;
allowDiscards = true;
}
];
fileSystems."/" = {
label = "root";
};
boot.initrd.luks.devices = [{
name = "crypt";
device = "/dev/disk/uuid/463d886d-7dfe-421b-8cef-f9af3a3fa09d";
preLVM = true;
allowDiscards = true;
}];
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;
}