mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nix: basic installer image generator
This commit is contained in:
parent
d11b9486eb
commit
b49def46ac
5 changed files with 130 additions and 3 deletions
70
nix/disko/carbon/default.nix
Normal file
70
nix/disko/carbon/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# Adapted from: https://github.com/nix-community/disko/blob/master/example/luks-lvm.nix
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = throw "Override me or change me";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ ];
|
||||
settings = {
|
||||
# # if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# # for example use `echo -n "password" > /tmp/secret.key`
|
||||
# keyFile = "/tmp/secret.key";
|
||||
askPassword = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "20G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
home = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
1
nix/disko/default.nix
Normal file
1
nix/disko/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ flake.diskoConfigurations.carbon = import ./carbon; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue