using nixos-anywhere

This commit is contained in:
2026-06-21 02:58:03 -04:00
parent f138e2265a
commit ee5a0574e2
3 changed files with 26 additions and 45 deletions
+3 -2
View File
@@ -17,9 +17,10 @@
inputs.home-manager.nixosModules.default
];
# Bootloader.
# Bootloader. SeaBIOS/BIOS boot via GRUB installed to the whole disk
# (writes boot.img to the MBR, core.img to the EF02 partition).
boot.loader.grub.enable = lib.mkDefault true;
boot.loader.grub.devices = ["nodev"];
boot.loader.grub.devices = ["/dev/sda"];
nix.settings.experimental-features = ["nix-command" "flakes"];
+11
View File
@@ -13,6 +13,17 @@
content = {
type = "gpt";
partitions = {
# GRUB's core.img lives here on GPT/BIOS systems (GPT leaves no
# gap after the MBR, so grub-install needs an EF02 partition).
# Not mounted; grub-install writes the boot code directly.
boot = {
size = "1M";
type = "EF02";
content = {
type = "filesystem";
format = "empty";
};
};
root = {
size = "100%";
content = {
+12 -43
View File
@@ -1,6 +1,15 @@
# 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.
# Hardware profile for buildbox (QEMU/KVM VM).
#
# Filesystems, swap, and boot-related disk config are intentionally NOT
# declared here — they are owned by disko via ./disko-config.nix, which
# sets config.fileSystems / config.swapDevices / config.boot when
# disko.enableConfig = true (the default). Keep this file limited to
# kernel modules and platform settings that disko does not manage.
#
# This file is still regenerated by `nixos-anywhere --generate-hardware-config
# nixos-generate-config ./hosts/buildbox/hardware-configuration.nix`, so any
# hand-edits here may be overwritten on the next install. The disko-owned
# filesystem entries below are stripped on purpose; do not re-add them.
{
config,
lib,
@@ -17,47 +26,7 @@
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-partuuid/REPLACE-ME";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd" "noatime"];
};
fileSystems."/home" = {
device = "/dev/disk/by-partuuid/REPLACE-ME";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-partuuid/REPLACE-ME";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-partuuid/REPLACE-ME";
fsType = "btrfs";
options = ["subvol=var-log" "compress=zstd" "noatime"];
neededForBoot = false;
};
fileSystems."/.snapshots" = {
device = "/dev/disk/by-partuuid/REPLACE-ME";
fsType = "btrfs";
options = ["subvol=snapshots" "compress=zstd" "noatime"];
neededForBoot = false;
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 4 * 1024;
}
];
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;