summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-04-17 15:46:45 +0200
committerlassulus <lass@lassul.us>2017-04-18 21:14:55 +0200
commitb6a9aa28eee2363e17169bbd71147c6cc89e9b8b (patch)
tree7ab9437e3e855bbef61c27ef8bbf6e50fa941702 /shared
parent3d1ad7c428b43550cefa358bbad64827484e4dd8 (diff)
shared shack-drivedroid: krebs.nginx -> services.nginx
Diffstat (limited to 'shared')
-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 3581f9e..07fcffa 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;
- '');
- };
- };
- };
}