add disko
This commit is contained in:
parent
c6be10a9b7
commit
0c30b1ed0d
2 changed files with 107 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
|||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix];
|
||||
imports = [./disk-config.nix ./hardware-configuration.nix];
|
||||
|
||||
nix.settings = {
|
||||
trusted-users = ["zoey"];
|
||||
|
|
@ -50,8 +50,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
documentation.man.generateCaches = false;
|
||||
|
||||
services.gdm-monitors.enable = true;
|
||||
|
||||
specialisation = {
|
||||
|
|
|
|||
106
systems/x86_64-linux/earth/disk-config.nix
Normal file
106
systems/x86_64-linux/earth/disk-config.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
root = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["nofail"];
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
backup = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme1n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zbackup";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "zstd";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
"root/nix" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/nix";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
|
||||
# README MORE: https://wiki.archlinux.org/title/ZFS#Swap_volume
|
||||
"root/swap" = {
|
||||
type = "zfs_volume";
|
||||
size = "32G";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
options = {
|
||||
volblocksize = "4096";
|
||||
compression = "zle";
|
||||
logbias = "throughput";
|
||||
sync = "always";
|
||||
primarycache = "metadata";
|
||||
secondarycache = "none";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zbackup = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "zstd";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/mnt/zbk";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue