summaryrefslogtreecommitdiffstats
path: root/shared/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-04-17 15:46:45 +0200
committertv <tv@krebsco.de>2017-04-17 15:59:42 +0200
commit48de4d6ae353d7df0259b53d01c97c12fdb6dd66 (patch)
treea0d1a3364824de9e2f05a200842ac741acb844d5 /shared/2configs
parent662ef4ee697cc07524ba0654ebf2ebcf30ee2b18 (diff)
shared shack-drivedroid: krebs.nginx -> services.nginx
Diffstat (limited to 'shared/2configs')
-rw-r--r--shared/2configs/shack-drivedroid.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/shared/2configs/shack-drivedroid.nix b/shared/2configs/shack-drivedroid.nix
index 3581f9e96..07fcffa42 100644
--- a/shared/2configs/shack-drivedroid.nix
+++ b/shared/2configs/shack-drivedroid.nix
@@ -1,4 +1,4 @@
-{ pkgs, lib, config, ... }:
+{ config, pkgs, ... }:
with import <stockholm/lib>;
let
repodir = "/var/srv/drivedroid";
@@ -7,6 +7,20 @@ in
{
environment.systemPackages = [ pkgs.drivedroid-gen-repo ];
+ services.nginx = {
+ enable = mkDefault true;
+ virtualHosts.shack-drivedroid = {
+ serverAliases = [
+ "drivedroid.shack"
+ ];
+ # TODO: prepare this somehow
+ locations."/".extraConfig = ''
+ root ${repodir};
+ index main.json;
+ '';
+ };
+ };
+
systemd.services.drivedroid = {
description = "generates drivedroid repo file";
restartIfChanged = true;
@@ -27,18 +41,4 @@ in
'';
};
};
-
- krebs.nginx = {
- enable = lib.mkDefault true;
- servers = {
- drivedroid-repo = {
- server-names = [ "drivedroid.shack" ];
- # TODO: prepare this somehow
- locations = lib.singleton (lib.nameValuePair "/" ''
- root ${repodir};
- index main.json;
- '');
- };
- };
- };
}