summaryrefslogtreecommitdiff
path: root/modules/snorlax/disk-config.nix
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-12 08:19:04 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-12 08:19:04 +0100
commit07f84bb581e369ff79100f0417e9d277f3c1fb61 (patch)
tree64ec899f185a3d794791df191f53939dbc67be41 /modules/snorlax/disk-config.nix
parent8fe481c0858702231335ad6c5eb850b293781b61 (diff)
alot of stuff
Diffstat (limited to 'modules/snorlax/disk-config.nix')
-rw-r--r--modules/snorlax/disk-config.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/snorlax/disk-config.nix b/modules/snorlax/disk-config.nix
new file mode 100644
index 0000000..9bac5f0
--- /dev/null
+++ b/modules/snorlax/disk-config.nix
@@ -0,0 +1,58 @@
+{
+ disko.devices = {
+ disk = {
+ sda = {
+ device = "/dev/sda";
+ type = "disk";
+ content = {
+ type = "gpt";
+ partitions = {
+ ESP = {
+ type = "EF00";
+ size = "64M";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
+ zfs = {
+ size = "100%";
+ content = {
+ type = "zfs";
+ pool = "zroot";
+ };
+ };
+ };
+ };
+ };
+ };
+
+ zpool = {
+ zroot = {
+ type = "zpool";
+ rootFsOptions = {
+ compression = "zstd";
+ "com.sun:auto-snapshot" = "false";
+ };
+ mountpoint = "/";
+ postCreateHook = "zfs list -t snap -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
+
+ datasets = {
+ git = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/git";
+ options."com.sun:auto-snapshot" = "true";
+ };
+
+ samba = {
+ type = "zfs_fs";
+ mountpoint = "/srv/samba";
+ options."com.sun:auto-snapshot" = "true";
+ };
+ };
+ };
+ };
+ };
+}