From d1b974b86cc9a3893f2271cfb613c312c47e17da Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 24 Sep 2024 18:56:27 +0100 Subject: [PATCH] yevaud: specify (non-boot-critical) zfs datasets with randomcat's module Also moves forgejo state directory to the default location --- hosts/yevaud/default.nix | 6 +++++- hosts/yevaud/hardware-configuration.nix | 5 ----- services/forgejo.nix | 4 ---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hosts/yevaud/default.nix b/hosts/yevaud/default.nix index d1804fe..d18de9a 100644 --- a/hosts/yevaud/default.nix +++ b/hosts/yevaud/default.nix @@ -52,10 +52,14 @@ networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ]; + randomcat.services.zfs.datasets = { + "rpool/state" = { mountpoint = "none"; }; + "rpool/state/forgejo" = { mountpoint = "/var/lib/forgejo"; }; + }; + qenya.services.forgejo = { enable = true; domain = "git.qenya.tel"; - stateDir = "/data/forgejo"; }; services.nginx = { diff --git a/hosts/yevaud/hardware-configuration.nix b/hosts/yevaud/hardware-configuration.nix index aa624a3..3a14ff6 100644 --- a/hosts/yevaud/hardware-configuration.nix +++ b/hosts/yevaud/hardware-configuration.nix @@ -28,11 +28,6 @@ fsType = "zfs"; }; - fileSystems."/data/forgejo" = - { device = "rpool/forgejo"; - fsType = "zfs"; - }; - fileSystems."/boot" = { device = "/dev/disk/by-uuid/107D-5AB3"; fsType = "vfat"; diff --git a/services/forgejo.nix b/services/forgejo.nix index 9f3f6f1..cf18e8f 100644 --- a/services/forgejo.nix +++ b/services/forgejo.nix @@ -10,9 +10,6 @@ in domain = mkOption { type = types.str; }; - stateDir = mkOption { - type = types.str; - }; }; config = mkIf cfg.enable { @@ -33,7 +30,6 @@ in forgejo = { enable = true; - stateDir = cfg.stateDir; settings = { DEFAULT.APP_NAME = cfg.domain; cache = {