57 lines
2.3 KiB
Nix
57 lines
2.3 KiB
Nix
|
|
{ disko, ... }:
|
||
|
|
|
||
|
|
# nix --extra-experimental-features "nix-command flakes" run github:nix-community/disko/latest#disko-install -- --flake ./#stationette --disk stationette --write-efi-boot-entries /dev/sda
|
||
|
|
{
|
||
|
|
imports = [ disko.nixosModules.disko ];
|
||
|
|
disko.devices = {
|
||
|
|
disk = {
|
||
|
|
stationette = {
|
||
|
|
type = "disk";
|
||
|
|
# Check this with lsblk
|
||
|
|
device = "/dev/sda";
|
||
|
|
content = {
|
||
|
|
type = "gpt";
|
||
|
|
partitions = {
|
||
|
|
ESP = {
|
||
|
|
size = "512M";
|
||
|
|
type = "EF00";
|
||
|
|
content = {
|
||
|
|
type = "filesystem";
|
||
|
|
format = "vfat";
|
||
|
|
mountpoint = "/boot";
|
||
|
|
mountOptions = [ "fmask=0022" "dmask=0022" "umask=0077" ];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
root = {
|
||
|
|
size = "100%";
|
||
|
|
content = {
|
||
|
|
type = "btrfs";
|
||
|
|
# Force overwrite
|
||
|
|
extraArgs = [ "-f" ];
|
||
|
|
subvolumes = {
|
||
|
|
"/root" = {
|
||
|
|
mountpoint = "/";
|
||
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||
|
|
};
|
||
|
|
"/nix" = {
|
||
|
|
mountpoint = "/nix";
|
||
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||
|
|
};
|
||
|
|
"/persist" = {
|
||
|
|
mountpoint = "/persist";
|
||
|
|
mountOptions = [ "compress=zstd" "noatime" ];
|
||
|
|
};
|
||
|
|
"/swap" = {
|
||
|
|
mountpoint = "/.swapvol";
|
||
|
|
swap.swapfile.size = "8G";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|