init loadedskypotato
This commit is contained in:
parent
93f39c8a0d
commit
d8abcde57a
11 changed files with 1233 additions and 0 deletions
32
loadedskypotato/mealie.nix
Normal file
32
loadedskypotato/mealie.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.cos.mealie; in
|
||||
{
|
||||
options.cos.mealie = {
|
||||
enable = lib.mkEnableOption "enable Mealie";
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mealie = {
|
||||
enable = true;
|
||||
port = cfg.port;
|
||||
listenAddress = "127.0.0.1";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts.${cfg.hostname} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${builtins.toString cfg.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue