Regenerated
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
{ inputs, config, lib, pkgs, ... }:
|
||||
{
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = true;
|
||||
};
|
||||
#boot.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelParams = [
|
||||
"systemd.mask=dev-tpm0.device"
|
||||
"systemd.mask=dev-tpmrm0.device"
|
||||
];
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
hostname,
|
||||
pkgs,
|
||||
lib,
|
||||
modulesPath,
|
||||
user,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
# (modulesPath + "/installer/scan/not-detected.nix")
|
||||
#../../hardware/hardware.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_usb_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/69433a14-fbaf-401b-af85-cd1bbf02b4e2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/811D-0676";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/b6c557c2-7682-460b-a5e7-8f6f2f429a3a"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
{ lib, config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
modulesPath = ./generated/modules;
|
||||
imported = inputs.import-tree modulesPath;
|
||||
|
||||
moduleSwitches = import ../../../assets/system/conf/modules.conf;
|
||||
|
||||
# STEP 1: evaluate all modules
|
||||
evaluatedModules =
|
||||
map (m: if builtins.isFunction m then m { inherit lib config; } else m) imported.imports;
|
||||
|
||||
# STEP 2: attach names safely
|
||||
modulesWithNames =
|
||||
map (m: {
|
||||
name = if m ? _file then builtins.replaceSuffix ".nix" "" (builtins.baseNameOf m._file) else "unknown";
|
||||
value = m;
|
||||
}) evaluatedModules;
|
||||
|
||||
# STEP 3: filter enabled modules
|
||||
enabledModules = builtins.filter (m: moduleSwitches.${m.name} or false) modulesWithNames;
|
||||
|
||||
# STEP 4: build debug string
|
||||
debugContents = builtins.concatStringsSep "\n"
|
||||
(map (m: "${m.name} (${builtins.toString (builtins.length (builtins.attrNames m.value))} attrs)") enabledModules);
|
||||
|
||||
# STEP 5: force evaluation to print to screen
|
||||
_ = builtins.trace ("==== Enabled modules (" + toString (builtins.length enabledModules) + ") ====\n" + debugContents) true;
|
||||
|
||||
# STEP 6: write to host /tmp during build
|
||||
hostDebugFile = pkgs.runCommand "traveldroid-modules-debug-host" {
|
||||
buildInputs = [ pkgs.coreutils ];
|
||||
} ''
|
||||
echo "${debugContents}" > /tmp/traveldroid-modules-debug.txt
|
||||
mkdir -p $out
|
||||
touch $out/dummy
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
networking.hostName = "traveldroid";
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
imports = [
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
home-manager.users = lib.mkMerge (map (m: m.value) enabledModules);
|
||||
|
||||
# Write debug file inside VM
|
||||
environment.etc."traveldroid-modules-debug.txt".text = debugContents;
|
||||
|
||||
# Ensure host-side debug file is built
|
||||
system.build.hostDebugDummy = hostDebugFile;
|
||||
}
|
||||
Reference in New Issue
Block a user