init loadedskypotato
This commit is contained in:
parent
93f39c8a0d
commit
d8abcde57a
11 changed files with 1233 additions and 0 deletions
32
loadedskypotato/grocy.nix
Normal file
32
loadedskypotato/grocy.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.cos.grocy; in
|
||||
{
|
||||
options.cos.grocy = {
|
||||
enable = lib.mkEnableOption "enable grocy";
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.grocy = {
|
||||
enable = true;
|
||||
hostName = cfg.hostname;
|
||||
dataDir = cfg.dataDir;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${cfg.hostname} = {
|
||||
listen = [{
|
||||
addr = "127.0.0.1";
|
||||
port = 8303;
|
||||
}];
|
||||
serverName = null;
|
||||
enableACME = lib.mkForce false;
|
||||
forceSSL = lib.mkForce false;
|
||||
};
|
||||
services.cloudflared.tunnels."4fc85af1-38f7-4c96-856c-7c797c5e3bf8".ingress.${cfg.hostname} = "http://127.0.0.1:8303";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue