mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
hosts/plover: make disko as a dedicated NixOS module
This commit is contained in:
parent
643d05a0f7
commit
458b8092dc
@ -14,6 +14,8 @@
|
||||
"${foodogsquaredModulesPath}/profiles/headless.nix"
|
||||
"${foodogsquaredModulesPath}/profiles/hardened.nix"
|
||||
|
||||
./disko.nix
|
||||
|
||||
./modules
|
||||
];
|
||||
|
||||
@ -37,11 +39,6 @@
|
||||
wireguard.enable = true;
|
||||
};
|
||||
|
||||
# Automatic format and partitioning.
|
||||
disko.devices = import ./disko.nix {
|
||||
disks = [ "/dev/sda" ];
|
||||
};
|
||||
|
||||
# Offline SSH!?!
|
||||
programs.mosh.enable = true;
|
||||
|
||||
|
@ -1,47 +1,48 @@
|
||||
{ disks ? [ "/dev/sda" ], ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
disk.sda = {
|
||||
device = builtins.elemAt disks 0;
|
||||
type = "disk";
|
||||
content = {
|
||||
format = "gpt";
|
||||
type = "table";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
start = "0";
|
||||
end = "1MiB";
|
||||
part-type = "primary";
|
||||
flags = [ "bios_grub" ];
|
||||
}
|
||||
disko.devices = {
|
||||
disk.sda = {
|
||||
device = [ "/dev/sda" ];
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
start = "0";
|
||||
end = "1MiB";
|
||||
part-type = "primary";
|
||||
flags = [ "bios_grub" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "ESP";
|
||||
start = "1MiB";
|
||||
end = "256MiB";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
flags = [ "esp" ];
|
||||
}
|
||||
{
|
||||
name = "ESP";
|
||||
start = "1MiB";
|
||||
end = "256MiB";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
flags = [ "esp" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "root";
|
||||
start = "256MiB";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
}
|
||||
];
|
||||
{
|
||||
name = "root";
|
||||
start = "256MiB";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user