test stuff

This commit is contained in:
mjallen18
2025-08-23 18:00:05 -05:00
parent c680392513
commit 6c9a010c3c
5 changed files with 70 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ in
partitions = {
ESP = {
type = "EF00";
size = "100M";
size = "500M";
content = {
type = "filesystem";
format = "vfat";

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{
services.btrfs = {
autoScrub.enable = lib.mkDefault true;
autoScrub.enable = lib.mkDefault false;
autoScrub.fileSystems = lib.mkDefault [
"/nix"
"/root"

View File

@@ -8,14 +8,14 @@ writeShellApplication {
echo "Usage: $0 <path-to-boot-image>"
exit 1
fi
tmpFile=$(mktemp /tmp/test-image.XXXXXX)
tmpFile=$(mktemp /home/matt/tmp/test-image.XXXXXX)
trap 'rm -f $tmpFile' EXIT
cp "$1" "$tmpFile"
qemu-system-x86_64 \
-enable-kvm \
-m 2G \
-m 4G \
-cpu max \
-smp 2 \
-smp 4 \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-device virtio-net-pci,netdev=net0 \
-drive if=pflash,format=raw,readonly=on,file=${OVMF.firmware} \

View File

@@ -5,7 +5,7 @@
{
imports = [
./boot.nix
# ./networking.nix - moved to modules/nixos/network
# ./hardware-configuration.nix
./users.nix
./sops.nix
];
@@ -18,7 +18,7 @@
services.home-assistant.enable = true;
hardware.disko = {
enable = true;
filesystem = "bcachefs";
filesystem = "btrfs";
};
impermanence.enable = true;
network = {

View File

@@ -0,0 +1,63 @@
# 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, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" "uas" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = lib.mkForce
{ device = "none";
fsType = "tmpfs";
options = [ "mode=755" ];
};
fileSystems."/boot" = lib.mkForce
{ device = "UUID=0FCB-EC63"; # "/dev/disk/by-partlabel/disk-main-ESP";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/var/log" = lib.mkForce
{ device = "UUID=88d9c058-757d-c06e-0fb7-a612f2db8a7a"; # "/dev/disk/by-partlabel/disk-main-root";
fsType = "bcachefs";
options = [ "X-mount.subdir=log" ];
};
fileSystems."/root" = lib.mkForce
{ device = lib.mkDefault "UUID=88d9c058-757d-c06e-0fb7-a612f2db8a7a"; # "/dev/disk/by-partlabel/disk-main-root";
fsType = "bcachefs";
options = [ "X-mount.subdir=root" ];
};
fileSystems."/etc" = lib.mkForce
{ device = lib.mkDefault "UUID=88d9c058-757d-c06e-0fb7-a612f2db8a7a"; # "/dev/disk/by-partlabel/disk-main-root";
fsType = "bcachefs";
options = [ "X-mount.subdir=etc" ];
};
fileSystems."/nix" = lib.mkForce
{ device = lib.mkDefault "UUID=88d9c058-757d-c06e-0fb7-a612f2db8a7a"; # "/dev/disk/by-partlabel/disk-main-root";
fsType = "bcachefs";
options = [ "X-mount.subdir=nix" "verbose" ];
};
fileSystems."/home" = lib.mkForce
{ device = lib.mkDefault "UUID=88d9c058-757d-c06e-0fb7-a612f2db8a7a"; # "/dev/disk/by-partlabel/disk-main-root";
fsType = "bcachefs";
options = [ "X-mount.subdir=home" ];
};
swapDevices =
[ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}