feat(*): initialize new Snix infrastructure
Co-Authored-By: edef <edef@edef.eu> Co-Authored-by: Ryan Lahfa <raito@lix.systems> Change-Id: Ica1cda177a236814de900f50a8a61d288f58f519
This commit is contained in:
parent
067eff3427
commit
a52ea3675c
124 changed files with 27723 additions and 1631 deletions
84
ops/machines/public01/disko.nix
Normal file
84
ops/machines/public01/disko.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
let
|
||||
disk = "/dev/sda";
|
||||
targetFsType = "xfs";
|
||||
swapSizeInGb = 16;
|
||||
in
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
${disk} = {
|
||||
device = "${disk}";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
priority = 100;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
PRIMARY = {
|
||||
# Take the next available range.
|
||||
start = "0";
|
||||
end = "-${toString swapSizeInGb}G";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "vg_${targetFsType}";
|
||||
};
|
||||
};
|
||||
SWAP = {
|
||||
# Start from the SWAP area.
|
||||
start = "-${toString swapSizeInGb}G";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
"vg_${targetFsType}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
ROOT = {
|
||||
name = "ROOT";
|
||||
size = "2G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = targetFsType;
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
NIX = {
|
||||
name = "NIX";
|
||||
size = "40%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = targetFsType;
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
VAR = {
|
||||
name = "VAR";
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = targetFsType;
|
||||
mountpoint = "/var";
|
||||
mountOptions = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue