Finalize this for some minimal headless VM somewhere down the road

This commit is contained in:
Bun 2025-03-24 03:44:28 -04:00
parent 8cf418ceca
commit 6b4722efe2
2 changed files with 13 additions and 18 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, ... }:
{ modulesPath, ... }:
{
imports = [
./boot
@ -6,6 +6,7 @@
./hardware
./users
../../modules/system
(modulesPath + "/profiles/headless.nix")
];
networking.hostName = "qemu";

View file

@ -6,7 +6,7 @@
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/vda";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
@ -25,17 +25,11 @@
mountOptions = [ "umask=0077" ];
};
};
luks = {
main = {
size = "100%";
content = {
type = "luks";
name = "${config.networking.hostName}-disk";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "${config.networking.hostName}";
};
type = "lvm_pv";
vg = "${config.networking.hostName}";
};
};
};
@ -59,18 +53,18 @@
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/persist/.snapshots" = { };
"/persist/home" = { };
"/persist/home/.snapshots" = { };
@ -78,7 +72,7 @@
};
};
swap = {
size = "4G";
size = "8G";
content = {
type = "swap";
discardPolicy = "both";