This commit is contained in:
Henry Hiles 2025-07-08 18:12:22 -04:00
parent b35e075c48
commit 1ac4ff7516
No known key found for this signature in database
4 changed files with 43 additions and 58 deletions

View file

@ -1,58 +0,0 @@
{
inputs,
lib,
}: {
imports = [inputs.disko.nixosModules.disko];
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -1,4 +1,5 @@
{
# TODO: Server too
security = {
polkit.persistentAuthentication = true;
run0-sudo-shim.enable = true;

8
modules/server/boot.nix Normal file
View file

@ -0,0 +1,8 @@
{modulesPath, ...}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix")];
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = true;
};
}

34
modules/server/disko.nix Normal file
View file

@ -0,0 +1,34 @@
{inputs, ...}: {
imports = [inputs.disko.nixosModules.disko];
disko.devices.disk.main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
}