Addid disko config for zfs
This commit is contained in:
parent
9a97168950
commit
f0d56df191
@ -2,9 +2,15 @@
|
||||
description = "System configuration for NixOS";
|
||||
|
||||
inputs = {
|
||||
# General inputs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
# For Minecraft VM
|
||||
nix-minecraft.url = "github:Jan-Bulthuis/nix-minecraft";
|
||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nix-modpack.url = "github:Jan-Bulthuis/nix-modpack";
|
||||
|
48
profiles/disko/vm.nix
Normal file
48
profiles/disko/vm.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "tank";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
tank = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
};
|
||||
mountpoint = "none";
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
|
||||
|
||||
datasets = {
|
||||
root = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user