test stuff
This commit is contained in:
@@ -93,7 +93,7 @@ in
|
|||||||
partitions = {
|
partitions = {
|
||||||
ESP = {
|
ESP = {
|
||||||
type = "EF00";
|
type = "EF00";
|
||||||
size = "100M";
|
size = "500M";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
services.btrfs = {
|
services.btrfs = {
|
||||||
autoScrub.enable = lib.mkDefault true;
|
autoScrub.enable = lib.mkDefault false;
|
||||||
autoScrub.fileSystems = lib.mkDefault [
|
autoScrub.fileSystems = lib.mkDefault [
|
||||||
"/nix"
|
"/nix"
|
||||||
"/root"
|
"/root"
|
||||||
|
|||||||
6
qemu.nix
6
qemu.nix
@@ -8,14 +8,14 @@ writeShellApplication {
|
|||||||
echo "Usage: $0 <path-to-boot-image>"
|
echo "Usage: $0 <path-to-boot-image>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tmpFile=$(mktemp /tmp/test-image.XXXXXX)
|
tmpFile=$(mktemp /home/matt/tmp/test-image.XXXXXX)
|
||||||
trap 'rm -f $tmpFile' EXIT
|
trap 'rm -f $tmpFile' EXIT
|
||||||
cp "$1" "$tmpFile"
|
cp "$1" "$tmpFile"
|
||||||
qemu-system-x86_64 \
|
qemu-system-x86_64 \
|
||||||
-enable-kvm \
|
-enable-kvm \
|
||||||
-m 2G \
|
-m 4G \
|
||||||
-cpu max \
|
-cpu max \
|
||||||
-smp 2 \
|
-smp 4 \
|
||||||
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
|
||||||
-device virtio-net-pci,netdev=net0 \
|
-device virtio-net-pci,netdev=net0 \
|
||||||
-drive if=pflash,format=raw,readonly=on,file=${OVMF.firmware} \
|
-drive if=pflash,format=raw,readonly=on,file=${OVMF.firmware} \
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
# ./networking.nix - moved to modules/nixos/network
|
# ./hardware-configuration.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
];
|
];
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
services.home-assistant.enable = true;
|
services.home-assistant.enable = true;
|
||||||
hardware.disko = {
|
hardware.disko = {
|
||||||
enable = true;
|
enable = true;
|
||||||
filesystem = "bcachefs";
|
filesystem = "btrfs";
|
||||||
};
|
};
|
||||||
impermanence.enable = true;
|
impermanence.enable = true;
|
||||||
network = {
|
network = {
|
||||||
|
|||||||
63
systems/x86_64-linux/nuc/hardware-configuration.nix
Normal file
63
systems/x86_64-linux/nuc/hardware-configuration.nix
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user