isso: fix; now it works :)
This commit is contained in:
parent
ce5607c49e
commit
ce57ed6732
|
@ -88,11 +88,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
isso = {
|
|
||||||
enable = false;
|
|
||||||
port = 1995;
|
|
||||||
};
|
|
||||||
|
|
||||||
code-server = {
|
code-server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "dev-firepit.oat.zone";
|
domain = "dev-firepit.oat.zone";
|
||||||
|
@ -104,6 +99,13 @@ in {
|
||||||
domain = "blog.oat.zone";
|
domain = "blog.oat.zone";
|
||||||
port = 1357;
|
port = 1357;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
isso = {
|
||||||
|
enable = true;
|
||||||
|
port = 1995;
|
||||||
|
domain = "comments.oat.zone";
|
||||||
|
target = "blog.oat.zone";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,8 @@ in {
|
||||||
port = cfg.port;
|
port = cfg.port;
|
||||||
# temporary
|
# temporary
|
||||||
auth = "password";
|
auth = "password";
|
||||||
# temporary; be sure to remove trailing newline
|
# temporary
|
||||||
hashedPassword = builtins.readFile /etc/code-server-password;
|
hashedPassword = removeSuffix "\n" (builtins.readFile /etc/code-server-password);
|
||||||
|
|
||||||
extraPackages = with pkgs; [ git nix nixpkgs-fmt ];
|
extraPackages = with pkgs; [ git nix nixpkgs-fmt ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,10 +13,18 @@ in {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "comments.oat.zone";
|
default = "comments.oat.zone";
|
||||||
};
|
};
|
||||||
|
target = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "blog.oat.zone";
|
||||||
|
};
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
default = 1550;
|
default = 1550;
|
||||||
};
|
};
|
||||||
|
dataDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/var/lib/isso";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -25,13 +33,14 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
host = "https://blog.oat.zone/";
|
dbpath = "${cfg.dataDir}/comments.db";
|
||||||
|
host = "https://${cfg.target}";
|
||||||
latest-enabled = true;
|
latest-enabled = true;
|
||||||
};
|
};
|
||||||
server = {
|
server = {
|
||||||
listen = "http://localhost:${toString cfg.port}";
|
listen = "http://localhost:${toString cfg.port}";
|
||||||
samesite = "Lax";
|
samesite = "Lax";
|
||||||
public-endpoint = "https://comments.oat.zone";
|
public-endpoint = "https://${cfg.domain}";
|
||||||
};
|
};
|
||||||
guard = {
|
guard = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
|
@ -40,7 +49,7 @@ in {
|
||||||
};
|
};
|
||||||
admin = {
|
admin = {
|
||||||
enabled = true;
|
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 .
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue