Restart = "always";
Type = "simple";
RestartSec = 1;
- Environment = "CHARM_SERVER_DATA_DIR=/var/lib/charm";
+ Environment = {
+ # TODO: Expand module a bit
+ # https://github.com/charmbracelet/charm#server-settings
+ CHARM_SERVER_DATA_DIR = "/var/lib/charm";
+ # CHARM_SERVER_USER_MAX_STORAGE = "";
+ };
StateDirectory = "charm";
WorkingDirectory = "/var/lib/charm";
};
--- /dev/null
+{ pkgs, config, ... }:
+let
+ fqdn = "charm.${config.networking.hostName}.${config.networking.domain}";
+in {
+ services.charm.enable = true;
+ environment.systemPackages = [
+ pkgs.charm
+ ];
+ environment.variables = {
+ CHARM_HOST = "${config.networking.fqdn}";
+ };
+ networking.hosts = {
+ "127.0.0.1" = [ "${fqdn}" ];
+ };
+}