File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed
nixos/services/applications Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change 1+ { config , lib , pkgs , ... } :
2+
3+ let
4+ inherit ( lib )
5+ mkEnableOption
6+ mkIf
7+ ;
8+
9+ cfg = config . custom . services . actual ;
10+ actualCfg = config . services . actual ;
11+
12+ domain = "actual.tobias-happ.de" ;
13+ in
14+
15+ {
16+
17+ ###### interface
18+
19+ options = {
20+
21+ custom . services . actual . enable = mkEnableOption "actual" ;
22+
23+ } ;
24+
25+
26+ ###### implementation
27+
28+ config = mkIf cfg . enable {
29+
30+ /*
31+ custom.services.backup.services.actual = {
32+ inherit (config.services.gitea) user;
33+ description = "Actual";
34+ interval = "Tue *-*-* 04:30:00";
35+
36+ script = ''
37+ pushd ${config.services.gitea.stateDir}
38+ ${pkgs.gitea}/bin/gitea dump \
39+ --config ${config.services.gitea.stateDir}/custom/conf/app.ini \
40+ --work-path ${config.services.gitea.stateDir}
41+ popd
42+
43+ mv ${config.services.gitea.stateDir}/gitea-dump-*.zip .
44+ chmod g+r *
45+ '';
46+ };
47+ */
48+
49+ services = {
50+ actual . enable = true ;
51+
52+ nginx . virtualHosts . ${ domain } = {
53+ enableACME = true ;
54+ #forceSSL = true;
55+ locations . "/" . proxyPass = "http://127.0.0.1:${ toString actualCfg . settings . port } /" ;
56+ } ;
57+ } ;
58+
59+ } ;
60+
61+ }
You can’t perform that action at this time.
0 commit comments