Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85a45a3078 | ||
|
|
4e87a6b569 | ||
|
|
87bf486ca3
|
@@ -104,6 +104,9 @@
|
||||
hive.korrosync.enable = true;
|
||||
hive.korrosync.localPort = 7416;
|
||||
hive.korrosync.instanceFQDN = "korrosync.jroeger.de";
|
||||
hive.wallabag.enable = true;
|
||||
hive.wallabag.localPort = 39184;
|
||||
hive.wallabag.instanceFQDN = "wallabag.jroeger.de";
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
self.nixosModules.matrix
|
||||
self.nixosModules.calibre
|
||||
self.nixosModules.korrosync-hive
|
||||
self.nixosModules.wallabag
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
services.nextcloud = {
|
||||
# Instance
|
||||
enable = true;
|
||||
package = pkgs.nextcloud33;
|
||||
package = pkgs.nextcloud34;
|
||||
hostName = cfg.instanceFQDN;
|
||||
https = cfg.ssl;
|
||||
configureRedis = true;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
flake.nixosModules.wallabag = {
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.hive.wallabag;
|
||||
in {
|
||||
options.hive.wallabag = {
|
||||
enable = lib.mkEnableOption "Enable wallabag service";
|
||||
localPort = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
example = 8080;
|
||||
default = 8088;
|
||||
description = "Specify the local port wallabag server uses.";
|
||||
};
|
||||
instanceFQDN = lib.mkOption {
|
||||
type = lib.types.singleLineStr;
|
||||
example = "wallabag.example.com";
|
||||
description = "Fully qualified domain name of the wallabag instance";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Fallback server with only 403
|
||||
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
|
||||
default = true;
|
||||
locations."/".return = 403;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
};
|
||||
|
||||
# Virtual host for wallabag
|
||||
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString cfg.localPort}";
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.wallabag = {
|
||||
image = "wallabag/wallabag:latest";
|
||||
ports = ["127.0.0.1:${toString cfg.localPort}:80"];
|
||||
volumes = [
|
||||
"wallabag-data:/var/www/wallabag/data"
|
||||
"wallabag-images:/var/www/wallabag/web/assets/images"
|
||||
];
|
||||
environment = {
|
||||
"SYMFONY__ENV__DOMAIN_NAME" = "https://${cfg.instanceFQDN}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user