add plausible
This commit is contained in:
@@ -14,5 +14,6 @@
|
|||||||
./kop-monitor.nix
|
./kop-monitor.nix
|
||||||
./kop-fileshare.nix
|
./kop-fileshare.nix
|
||||||
./adam-site.nix
|
./adam-site.nix
|
||||||
|
./plausible.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
37
modules/services/plausible.nix
Normal file
37
modules/services/plausible.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
let cfg = config.custom.services.plausible;
|
||||||
|
in {
|
||||||
|
options.custom.services.plausible = {
|
||||||
|
enable = lib.mkEnableOption "Enables plausible";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
|
age.secrets.plausible-admin = {
|
||||||
|
file = ../../secrets/plausible-admin.age;
|
||||||
|
};
|
||||||
|
age.secrets.plausible-keybase = {
|
||||||
|
file = ../../secrets/plausible-keybase.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.plausible = {
|
||||||
|
enable = true;
|
||||||
|
adminUser = {
|
||||||
|
# activate is used to skip the email verification of the admin-user that's
|
||||||
|
# automatically created by plausible. This is only supported if
|
||||||
|
# postgresql is configured by the module. This is done by default, but
|
||||||
|
# can be turned off with services.plausible.database.postgres.setup.
|
||||||
|
activate = true;
|
||||||
|
email = "admin@localhost";
|
||||||
|
passwordFile = config.age.secrets.plausible-admin.path;
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
baseUrl = "https://plausible.imbissaggsbachdorf.at";
|
||||||
|
#baseUrl = "http://localhost";
|
||||||
|
# secretKeybaseFile is a path to the file which contains the secret generated
|
||||||
|
# with openssl as described above.
|
||||||
|
secretKeybaseFile = config.age.secrets.plausible-keybase.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ buildNpmPackage rec {
|
|||||||
src = fetchGit {
|
src = fetchGit {
|
||||||
url = "git@github.com:oberprofis/adams.git";
|
url = "git@github.com:oberprofis/adams.git";
|
||||||
ref = "main";
|
ref = "main";
|
||||||
rev = "b5af7fe2acf2fcf3b7b115f39c9401d0bf40456d";
|
rev = "68fa8392335a462634d4bb886344762592c8d566";
|
||||||
};
|
};
|
||||||
npmDepsHash="sha256-ULxOaEpa2+YS45kh+2xCZMqXQs5bMYhy7J08DsFYE+s=";
|
npmDepsHash="sha256-ULxOaEpa2+YS45kh+2xCZMqXQs5bMYhy7J08DsFYE+s=";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|||||||
7
secrets/plausible-admin.age
Normal file
7
secrets/plausible-admin.age
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 bqM3xA Wrj1qtU09AyFSgxzqH0eCYWwlGhZEgIZJBrjywU/bSg
|
||||||
|
mMwRqlAGXFCUr+Nj/6JMbjjJHLbwHm4/mrOjwaxBlDM
|
||||||
|
-> ssh-ed25519 DCzi1A hgOetbh8HzZeDfHccR5LG7V8ImLyY7Hil+LvcIAO5RQ
|
||||||
|
xfLj0NwDZ0jUzCjxs3DUHGxu3tQc7uShMduyl9hoqe8
|
||||||
|
--- uaqIvyCHbDxezDYBgIYAlBYD+Dtw+jIFknYl8DQVRnM
|
||||||
|
Ñï!«ø9~:_!‘ÍàAã†p]¡êh9Ê{ °HÀŒKùM¡v‘L¢ =T‘O¹üòA%Á8 ±u[<12>Î2¢-Ì‚§ÖÙ,2Ü*jƒ[šºôVñ<>8s0@¸g
|
||||||
BIN
secrets/plausible-keybase.age
Normal file
BIN
secrets/plausible-keybase.age
Normal file
Binary file not shown.
@@ -3,6 +3,7 @@ let
|
|||||||
server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUA7uVKXAF2UcwaIDSJP2Te8Fi++2zkKzSPoRx1vQrI root@server";
|
server = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAUA7uVKXAF2UcwaIDSJP2Te8Fi++2zkKzSPoRx1vQrI root@server";
|
||||||
laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqcphdDEJhnSBkAZzQXZJDCzsyb/Tqpcf0pUADFpbd1 root@nix-laptop";
|
laptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDqcphdDEJhnSBkAZzQXZJDCzsyb/Tqpcf0pUADFpbd1 root@nix-laptop";
|
||||||
mini-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKla9+Gj2i9Ax7cIdnTM6zsmze3g1N/qCPqhga0P+toU root@mini-pc";
|
mini-pc = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKla9+Gj2i9Ax7cIdnTM6zsmze3g1N/qCPqhga0P+toU root@mini-pc";
|
||||||
|
adam-site = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfaIaKoNStnbfjB9cSJ9+PW0BVO3Uhh1uIbZA2CszDE root@nixos";
|
||||||
users = [ kop ];
|
users = [ kop ];
|
||||||
systems = [ mini-pc server laptop ];
|
systems = [ mini-pc server laptop ];
|
||||||
in
|
in
|
||||||
@@ -28,4 +29,6 @@ in
|
|||||||
"fileshelter-conf.age".publicKeys = [ mini-pc server kop ];
|
"fileshelter-conf.age".publicKeys = [ mini-pc server kop ];
|
||||||
"webhook.age".publicKeys = [ mini-pc server kop ];
|
"webhook.age".publicKeys = [ mini-pc server kop ];
|
||||||
"stash-auth.age".publicKeys = [ mini-pc server kop ];
|
"stash-auth.age".publicKeys = [ mini-pc server kop ];
|
||||||
|
"plausible-admin.age".publicKeys = [ adam-site kop ];
|
||||||
|
"plausible-keybase.age".publicKeys = [ adam-site kop ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
services = {
|
services = {
|
||||||
acme.enable = true;
|
acme.enable = true;
|
||||||
adam-site.enable = true;
|
adam-site.enable = true;
|
||||||
|
plausible.enable = true;
|
||||||
};
|
};
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
nix = { settings.enable = true; };
|
nix = { settings.enable = true; };
|
||||||
@@ -34,6 +35,11 @@
|
|||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/".proxyPass = "http://127.0.0.1:4000";
|
locations."/".proxyPass = "http://127.0.0.1:4000";
|
||||||
};
|
};
|
||||||
|
"plausible.imbissaggsbachdorf.at" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://127.0.0.1:8000";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user