disko test
This commit is contained in:
@@ -469,7 +469,7 @@
|
|||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
pi4-disko.nixosModules.disko
|
pi4-disko.nixosModules.disko
|
||||||
./share/disko/disko.nix
|
./share/disko/pi-uefi-disko.nix
|
||||||
|
|
||||||
pi4-impermanence.nixosModules.impermanence
|
pi4-impermanence.nixosModules.impermanence
|
||||||
pi4-sops-nix.nixosModules.sops
|
pi4-sops-nix.nixosModules.sops
|
||||||
|
|||||||
101
share/disko/pi-uefi-disko.nix
Normal file
101
share/disko/pi-uefi-disko.nix
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
rootDisk = "/dev/nvme0n1";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
disko.devices.disk.main.imageSize = "32G";
|
||||||
|
disko.devices = {
|
||||||
|
nodev."/" = {
|
||||||
|
fsType = "tmpfs";
|
||||||
|
mountOptions = [
|
||||||
|
"mode=755"
|
||||||
|
"defaults"
|
||||||
|
"size=2G"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# root disk setup
|
||||||
|
disk.main = {
|
||||||
|
type = "disk";
|
||||||
|
device = rootDisk;
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
# specify partitions
|
||||||
|
partitions = {
|
||||||
|
# /boot/firmware
|
||||||
|
FIRMWARE = {
|
||||||
|
priority = 1;
|
||||||
|
name = "FIRMWARE";
|
||||||
|
start = "1M";
|
||||||
|
end = "1G";
|
||||||
|
type = "0700";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot/firmware";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# /boot
|
||||||
|
ESP = {
|
||||||
|
priority = 1;
|
||||||
|
name = "ESP";
|
||||||
|
start = "1G";
|
||||||
|
end = "2G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
root = {
|
||||||
|
name = "btrfs-root";
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
# Subvolumes must set a mountpoint in order to be mounted,
|
||||||
|
# unless their parent is mounted
|
||||||
|
subvolumes = {
|
||||||
|
"home" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
"root" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/root";
|
||||||
|
};
|
||||||
|
"nix" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
"etc" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/etc";
|
||||||
|
};
|
||||||
|
"log" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/var/log";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user