Finalize this for some minimal headless VM somewhere down the road
This commit is contained in:
parent
8cf418ceca
commit
6b4722efe2
2 changed files with 13 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
|
@ -6,6 +6,7 @@
|
|||
./hardware
|
||||
./users
|
||||
../../modules/system
|
||||
(modulesPath + "/profiles/headless.nix")
|
||||
];
|
||||
|
||||
networking.hostName = "qemu";
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/vda";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
|
@ -25,13 +25,8 @@
|
|||
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}";
|
||||
|
@ -41,7 +36,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
|
@ -59,7 +53,7 @@
|
|||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
|
||||
mountOptions = [ "compress=zstd" "noatime" "ssd" "noexec" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
|
@ -78,7 +72,7 @@
|
|||
};
|
||||
};
|
||||
swap = {
|
||||
size = "4G";
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue