shared shack-drivedroid: krebs.nginx -> services.nginx
This commit is contained in:
parent
662ef4ee69
commit
48de4d6ae3
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ config, pkgs, ... }:
|
||||||
with import <stockholm/lib>;
|
with import <stockholm/lib>;
|
||||||
let
|
let
|
||||||
repodir = "/var/srv/drivedroid";
|
repodir = "/var/srv/drivedroid";
|
||||||
|
@ -7,6 +7,20 @@ in
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.drivedroid-gen-repo ];
|
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 = {
|
systemd.services.drivedroid = {
|
||||||
description = "generates drivedroid repo file";
|
description = "generates drivedroid repo file";
|
||||||
restartIfChanged = true;
|
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;
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue