mirror of
https://github.com/nix-community/disko.git
synced 2026-12-01 21:43:29 +01:00
reimplement disko using the nixos type system
This should make the code cleaner, more robust and errors should be clearer. we also changed the configuration format a bit.
This commit is contained in:
1 parent
adf901d581
commit
dcb0c42857
11 files changed
+1545
-534
No files matched your search
+29
-24
@@ -1,14 +1,23 @@
|
||||
{
|
||||
type = "devices";
|
||||
content = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
type = "disk";
|
||||
device = "/dev/vdb";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
vdc = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
type = "disk";
|
||||
device = "/dev/vdc";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
mode = "mirror";
|
||||
@@ -18,35 +27,31 @@
|
||||
};
|
||||
mountpoint = "/";
|
||||
|
||||
datasets = [
|
||||
{
|
||||
type = "zfs_filesystem";
|
||||
name = "zfs_fs";
|
||||
datasets = {
|
||||
zfs_fs = {
|
||||
zfs_type = "filesystem";
|
||||
mountpoint = "/zfs_fs";
|
||||
options."com.sun:auto-snapshot" = "true";
|
||||
}
|
||||
{
|
||||
type = "zfs_filesystem";
|
||||
name = "zfs_unmounted_fs";
|
||||
};
|
||||
zfs_unmounted_fs = {
|
||||
zfs_type = "filesystem";
|
||||
options.mountpoint = "none";
|
||||
}
|
||||
{
|
||||
type = "zfs_filesystem";
|
||||
name = "zfs_legacy_fs";
|
||||
};
|
||||
zfs_legacy_fs = {
|
||||
zfs_type = "filesystem";
|
||||
options.mountpoint = "legacy";
|
||||
mountpoint = "/zfs_legacy_fs";
|
||||
}
|
||||
{
|
||||
type = "zfs_volume";
|
||||
name = "zfs_testvolume";
|
||||
};
|
||||
zfs_testvolume = {
|
||||
zfs_type = "volume";
|
||||
size = "10M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/ext4onzfs";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user