diff --git a/modules/forgejo/default.nix b/modules/forgejo/default.nix index 6f42343..89e3709 100644 --- a/modules/forgejo/default.nix +++ b/modules/forgejo/default.nix @@ -41,7 +41,9 @@ in { }; systemd.tmpfiles.rules = - lib.optional useSubdomain + lib.optional (!(builtins.isNull cfg.themes)) + "L+ ${forgejo.stateDir}/custom/public/assets - - - - ${cfg.theme}" + ++ lib.optional (!(builtins.isNull cfg.templates)) "L+ ${forgejo.stateDir}/custom/templates - - - - ${cfg.templates}"; } // lib.mkIf cfg.createUser { diff --git a/modules/forgejo/options.nix b/modules/forgejo/options.nix index 8570a5e..ca36137 100644 --- a/modules/forgejo/options.nix +++ b/modules/forgejo/options.nix @@ -35,6 +35,16 @@ args@{ config, lib, ... }: ''; }; + theme = lib.mkOption { + type = lib.types.nullOr lib.types.path; + default = null; + description = '' + A directory containing a custom Forgejo theme. + + This directory should contain two subdirectories `css` and `img`. + ''; + }; + templates = lib.mkOption { type = lib.types.nullOr lib.types.path; default = null;