link lxd preseed to zfs volume
This commit is contained in:
parent
f3f50b051a
commit
4c1e243555
|
@ -1,4 +1,16 @@
|
|||
{
|
||||
{ pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
};
|
||||
In your own system use something like this:
|
||||
import (builtins.fetchGit {
|
||||
url = "https://github.com/nix-community/disko";
|
||||
ref = "master";
|
||||
}) {
|
||||
inherit lib;
|
||||
};{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
x = {
|
||||
|
@ -45,13 +57,13 @@
|
|||
"xattr" = "sa";
|
||||
"ashift" = "13";
|
||||
};
|
||||
mountpoint = "/mnt/zfs";
|
||||
mountpoint = "/mnt/zpool";
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zspeed@blank$' || zfs snapshot zspeed@blank";
|
||||
|
||||
datasets = {
|
||||
postgres = {
|
||||
type = "zfs_volume";
|
||||
size = "10G";
|
||||
size = "10G -s";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
};
|
||||
|
||||
storage_pool = {
|
||||
name = "test";
|
||||
driver = "zfs";
|
||||
config.source = "zspeed/test";
|
||||
name = "postgres";
|
||||
driver = "disk";
|
||||
config.source = "/mnt/postgres";
|
||||
};
|
||||
|
||||
profile = {
|
||||
|
|
|
@ -17,6 +17,9 @@ in
|
|||
inputs.disko.nixosModules.disko
|
||||
(import ../common/disks { device = dev; impermanence = impermanence; fsType = fsType; encrypted = encrypted; })
|
||||
|
||||
# Zfs disk configuration
|
||||
../common/disks/zfs/zspeed.nix
|
||||
|
||||
# Import core options
|
||||
./hardware-configuration.nix
|
||||
../common/core
|
||||
|
|
Loading…
Reference in New Issue