Compare commits
3 commits
0a208223c8
...
285a8e6a8e
Author | SHA1 | Date | |
---|---|---|---|
285a8e6a8e | |||
ed667e15e9 | |||
75cc371c01 |
4 changed files with 60 additions and 9 deletions
|
@ -9,6 +9,8 @@
|
||||||
bindSecrets = true;
|
bindSecrets = true;
|
||||||
|
|
||||||
config = { config, lib, pkgs, ... }: {
|
config = { config, lib, pkgs, ... }: {
|
||||||
|
environment.systemPackages = [ pkgs.morph pkgs.pgloader ];
|
||||||
|
|
||||||
systemd.services.mattermost.serviceConfig.EnvironmentFile =
|
systemd.services.mattermost.serviceConfig.EnvironmentFile =
|
||||||
lib.mkForce "/secrets/env";
|
lib.mkForce "/secrets/env";
|
||||||
|
|
||||||
|
@ -162,7 +164,8 @@
|
||||||
MetricsSettings.Enable = false;
|
MetricsSettings.Enable = false;
|
||||||
GuestAccountsSettings.Enable = false;
|
GuestAccountsSettings.Enable = false;
|
||||||
FeatureFlags.CollapsedThreads = true;
|
FeatureFlags.CollapsedThreads = true;
|
||||||
SqlSettings.DriverName = "mysql";
|
SqlSettings.DriverName = "postgres";
|
||||||
|
SqlSettings.DataSource = "postgres:///mattermost?host=/run/postgresql";
|
||||||
};
|
};
|
||||||
|
|
||||||
# turn of the weirder parts of this module (which insist on passwords
|
# turn of the weirder parts of this module (which insist on passwords
|
||||||
|
@ -173,15 +176,26 @@
|
||||||
localDatabaseCreate = false;
|
localDatabaseCreate = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.mysql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = lib.mkForce true; # mattermost sets this to false. wtf.
|
||||||
|
package = pkgs.postgresql_15;
|
||||||
ensureDatabases = [ "mattermost" ];
|
ensureDatabases = [ "mattermost" ];
|
||||||
ensureUsers = [ {
|
ensureUsers = [ {
|
||||||
name = "mattermost";
|
name = "mattermost";
|
||||||
ensurePermissions = { "mattermost.*" = "ALL PRIVILEGES"; };
|
ensureDBOwnership = true;
|
||||||
} ];
|
} ];
|
||||||
package = pkgs.mysql80;
|
|
||||||
dataDir = "/persist/mysql";
|
authentication = lib.mkForce ''
|
||||||
|
# Generated file; do not edit!
|
||||||
|
local all all trust
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.postgresqlBackup = {
|
||||||
|
enable = true;
|
||||||
|
databases = [ "mattermost" ];
|
||||||
|
startAt = "*-*-* 23:45:00";
|
||||||
|
location = "/persist/backups/postgres";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,6 +13,10 @@ let
|
||||||
buildGoModule = unstable.buildGo122Module;
|
buildGoModule = unstable.buildGo122Module;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
morph = callPackage ./morph.nix {
|
||||||
|
buildGoModule = unstable.buildGo122Module;
|
||||||
|
};
|
||||||
|
|
||||||
forgejo = callPackage ./forgejo {
|
forgejo = callPackage ./forgejo {
|
||||||
buildGoModule = unstable.buildGo122Module;
|
buildGoModule = unstable.buildGo122Module;
|
||||||
};
|
};
|
||||||
|
|
33
pkgs/morph.nix
Normal file
33
pkgs/morph.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ buildGoModule
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "mattermost-morph";
|
||||||
|
version = "1.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "mattermost";
|
||||||
|
repo = "morph";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-Orh/a9OlUVIlDdLXRpDAnHUmWRiM1N2oO+dijbuJzx8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = null;
|
||||||
|
|
||||||
|
subPackages = [ "cmd/morph" ];
|
||||||
|
|
||||||
|
tags = [ "production" ];
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.Version=${version}"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.BuildNumber=${version}-nixpkgs"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.BuildDate=1970-01-01"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.BuildHash=v${version}"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.BuildHashEnterprise=none"
|
||||||
|
"-X github.com/mattermost/mattermost/server/public/model.BuildEnterpriseReady=false"
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
hedgedoc-hacc:
|
hedgedoc-hacc:
|
||||||
env: ENC[AES256_GCM,data:e2vSolxJNucya9QNs28gAVDBJQq5AJh7jS1nBh0UTkDnhNL8NPW1KTxcun4rM99EhiNZsz6Z9qHRMejmP4frQw==,iv:DqAGhGWYf/EpGnI79MxKmBlHMhK26zx50vXb1TbvESw=,tag:Xix499XAcAmxhNuGr2ApcA==,type:str]
|
env: ENC[AES256_GCM,data:e2vSolxJNucya9QNs28gAVDBJQq5AJh7jS1nBh0UTkDnhNL8NPW1KTxcun4rM99EhiNZsz6Z9qHRMejmP4frQw==,iv:DqAGhGWYf/EpGnI79MxKmBlHMhK26zx50vXb1TbvESw=,tag:Xix499XAcAmxhNuGr2ApcA==,type:str]
|
||||||
mattermost:
|
mattermost:
|
||||||
env: ENC[AES256_GCM,data:L9GBhCvdHUKlDQ1J3uvEqVziv9yCCISycexyTo/U0Hx8vPVk3TAEOk8zP23XAUsHNEE2L0ibzHBTVAMiXMmFkiuyxlmLqfRemZ3cm4eXMPP8Wks+5d9yFKLYAaQgjpFUEOX5k+FHvN3+ADs/zTBT7LRWIKtga4yr14VfXAzmde2TFZM30Fdoj24EBdgaCjuh4FC9GMmivT/PtCX5s87c3O48EM993llhINVtnYxCLItunBCax/PQX2duVrvYg8FA6ldH6rUOy1fPtWVR8Vs9loSsTnK2AkrRKOzqKxU+lkQENHIGrHWhcl2toPAgeE5on//9tMpZVwYwJrubvAa2luikVEdAnjSQh3Co4bVSECzQTqp6pkm4gzgwagn3rSdbR40=,iv:auCnnA6+35LTW7E/0AWWwjh6Jmq/Y57MjiBKI8aJb9U=,tag:/7fAqyG87CxekN/QVKrLsg==,type:str]
|
env: ENC[AES256_GCM,data:ftWpGl6+sUMzJJKgfcPLvbFGGn16AKUPzPn8X6DNVMLrxZIkQ23Tk3ekKLKFpQEUtQfFjVlrTfFZezWKs4nVNLg2LmQqJNGMCCax5PRwAgoAsJ7pa9ewNmHT+EIXtZEjQgVfN5786Yno5n/6JJ1lz6EiGmdn7/0rF5TLGjzig17azazS1+lkIYY=,iv:SZvGGKpVRI/odHbmgY8M6t6zCk8RgM+7EQEgRiizglA=,tag:cInsVo/QD85m+LxldyRlnA==,type:str]
|
||||||
tracktrain:
|
tracktrain:
|
||||||
env: ENC[AES256_GCM,data:W3+8qWomPgGJt5u50aAm9x/dilMpqKY11I2AdaIBTz5posc25ts0LB5S/Sxe1ROz4itpDK3QvjoFUTRhS39k4dwMr5lqXV8Ln4B+sPpvh7oBM8A5zydP8Jj1J1YqRt8++RTUmb4z41DIwb/yaZKMu6z0guXIu1yuYzcbCuk0xe/iOp6UUpfjOzzWTvxY54zY6kWcjHLiCSwD31Cd+MxMPfbUEkHt+0W+sBmYXGeEFI/6ULSB6FnGjNW6F9g=,iv:3ymah8HG+Yg6VYZZA/MRRjHDYvYJz01ezvhfQiftegg=,tag:trht+PRYfKgWJkg2wRwISQ==,type:str]
|
env: ENC[AES256_GCM,data:W3+8qWomPgGJt5u50aAm9x/dilMpqKY11I2AdaIBTz5posc25ts0LB5S/Sxe1ROz4itpDK3QvjoFUTRhS39k4dwMr5lqXV8Ln4B+sPpvh7oBM8A5zydP8Jj1J1YqRt8++RTUmb4z41DIwb/yaZKMu6z0guXIu1yuYzcbCuk0xe/iOp6UUpfjOzzWTvxY54zY6kWcjHLiCSwD31Cd+MxMPfbUEkHt+0W+sBmYXGeEFI/6ULSB6FnGjNW6F9g=,iv:3ymah8HG+Yg6VYZZA/MRRjHDYvYJz01ezvhfQiftegg=,tag:trht+PRYfKgWJkg2wRwISQ==,type:str]
|
||||||
vaultwarden:
|
vaultwarden:
|
||||||
|
@ -100,8 +100,8 @@ sops:
|
||||||
bndBTXJhQVE2OVlKeGNTbzJlL0duUzAKIWdesesYvBIN/m36fhzxq30+IT8qp/pF
|
bndBTXJhQVE2OVlKeGNTbzJlL0duUzAKIWdesesYvBIN/m36fhzxq30+IT8qp/pF
|
||||||
S6i7QqZF75y2BpEoupRCqNIAsHrouUE+U9ZQJZO8m9J591mWvbVJIw==
|
S6i7QqZF75y2BpEoupRCqNIAsHrouUE+U9ZQJZO8m9J591mWvbVJIw==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-05-08T12:29:13Z"
|
lastmodified: "2024-05-19T21:17:46Z"
|
||||||
mac: ENC[AES256_GCM,data:Gt1UQy531A9YguKSWzgq2+EKATY2yqE7lCtG9+BYCCB2idMq6bNbKoLn5+kUTv/4y4P/4mgeTdMqdUDrF3nUTqpyyiE0U1I/B9z05iN1Xo5rnEOswX2TvT+br838vw4ueIk/4EmXlRyYRYJi/kTRtBcnYfDjbIYVE0JVkHutjmc=,iv:xsZAJlZCvGWoov1DRx4obt+OQeDMnU+OqCI3/1mzz5c=,tag:+MALy05C1hEUeODC0VcUEg==,type:str]
|
mac: ENC[AES256_GCM,data:rzxX2fl+EQbhQUcmr6lKoYcUpAb1G3IKjsJJjCrMKN5t4oevI85GtTU3Q+pLrIFLjfkgIV8yiNH4usg0ghtoahQUkrnlZxkOoCktfgM67hRcUniY8UUxY4HqFFK3KzXFqc8Q4vXrerQgJy87Xg+ret9wCQXBbM3AB+B1fsmLE9s=,iv:pm1FakBlOFibps6R5kXMUq+IEl074mEmRIQmdeDxPs4=,tag:hQsV0NZNgDGYjFOK7+SKqg==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.8.1
|
version: 3.8.1
|
||||||
|
|
Loading…
Reference in a new issue