isso: fix; now it works :)

This commit is contained in:
Jill 2023-02-01 02:41:42 +01:00
parent ce5607c49e
commit ce57ed6732
3 changed files with 31 additions and 10 deletions

View File

@ -88,11 +88,6 @@ in {
enable = true;
};
isso = {
enable = false;
port = 1995;
};
code-server = {
enable = true;
domain = "dev-firepit.oat.zone";
@ -104,6 +99,13 @@ in {
domain = "blog.oat.zone";
port = 1357;
};
isso = {
enable = true;
port = 1995;
domain = "comments.oat.zone";
target = "blog.oat.zone";
};
};
};

View File

@ -26,8 +26,8 @@ in {
port = cfg.port;
# temporary
auth = "password";
# temporary; be sure to remove trailing newline
hashedPassword = builtins.readFile /etc/code-server-password;
# temporary
hashedPassword = removeSuffix "\n" (builtins.readFile /etc/code-server-password);
extraPackages = with pkgs; [ git nix nixpkgs-fmt ];
};

View File

@ -13,10 +13,18 @@ in {
type = types.str;
default = "comments.oat.zone";
};
target = mkOption {
type = types.str;
default = "blog.oat.zone";
};
port = mkOption {
type = types.port;
default = 1550;
};
dataDir = mkOption {
type = types.str;
default = "/var/lib/isso";
};
};
config = mkIf cfg.enable {
@ -25,13 +33,14 @@ in {
enable = true;
settings = {
general = {
host = "https://blog.oat.zone/";
dbpath = "${cfg.dataDir}/comments.db";
host = "https://${cfg.target}";
latest-enabled = true;
};
server = {
listen = "http://localhost:${toString cfg.port}";
samesite = "Lax";
public-endpoint = "https://comments.oat.zone";
public-endpoint = "https://${cfg.domain}";
};
guard = {
enabled = true;
@ -40,7 +49,7 @@ in {
};
admin = {
enabled = true;
password = "a8UYAH7jQQC3LjnG";
password = removeSuffix "\n" (builtins.readFile /etc/isso_admin_pass);
};
};
};
@ -59,5 +68,15 @@ in {
};
};
};
systemd.services.isso.serviceConfig = {
preStart = ''
umask u=rwx,g=rwx,o=rx
mkdir -p ${cfg.dataDir}
cd ${cfg.dataDir}
${pkgs.coreutils}/bin/chown -R isso:isso .
${pkgs.coreutils}/bin/chmod -R 775 .
'';
};
};
}