WIP: Site musique

This commit is contained in:
nyanloutre 2018-05-09 16:47:02 +02:00
parent 3254a57c8f
commit df18298920
4 changed files with 49 additions and 0 deletions

View File

@ -42,6 +42,7 @@
(import ./overlays/organizr.nix) (import ./overlays/organizr.nix)
(import ./overlays/sudo.nix) (import ./overlays/sudo.nix)
(import ./overlays/site-max.nix) (import ./overlays/site-max.nix)
(import ./overlays/site-musique.nix)
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
neovim neovim

View File

@ -0,0 +1,5 @@
self: super:
{
site-musique = super.callPackage ../pkgs/site-musique { };
}

View File

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name= "site-musique-${version}";
version = "1.0.0";
src = fetchFromGitHub {
owner = "nyanloutre";
repo = "site-musique";
rev = "42ffbfa85422f0d3e98e842ca702e07cb20be0c0";
sha256 = "1ndfwg6rpkm2hn5naw0c91l6zbpcd011irs8imchqzbj4m2i7wgm";
};
installPhase = ''
mkdir -p $out/
cp -R . $out/
'';
meta = {
description = "Site internet de l'association Musique Fraternité de Meyenheim";
homepage = https://musique-meyenheim.fr/;
maintainers = with stdenv.lib.maintainers; [ nyanloutre ];
license = stdenv.lib.licenses.cc-by-nc-sa-40;
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -9,6 +9,7 @@ let
organizr_port = 52346; organizr_port = 52346;
pgmanage_port = 52347; pgmanage_port = 52347;
max_port = 52348; max_port = 52348;
musique_port = 52349;
in in
{ {
@ -36,6 +37,7 @@ in
calibre = { ip = "127.0.0.1"; port = 8080; auth = false; }; calibre = { ip = "127.0.0.1"; port = 8080; auth = false; };
pgmanage = { ip = "127.0.0.1"; port = pgmanage_port; auth = true; }; pgmanage = { ip = "127.0.0.1"; port = pgmanage_port; auth = true; };
max = { ip = "127.0.0.1"; port = max_port; auth = false; }; max = { ip = "127.0.0.1"; port = max_port; auth = false; };
musique = { ip = "127.0.0.1"; port = musique_port; auth = false; };
}; };
services.mailserver.enable = true; services.mailserver.enable = true;
@ -137,6 +139,21 @@ in
listen = [ { addr = "127.0.0.1"; port = max_port; } ]; listen = [ { addr = "127.0.0.1"; port = max_port; } ];
locations = { "/" = { root = pkgs.site-max; }; }; locations = { "/" = { root = pkgs.site-max; }; };
}; };
"musique" = {
listen = [ { addr = "127.0.0.1"; port = musique_port; } ];
locations."/" = {
root = pkgs.site-musique;
index = "index.php";
extraConfig = ''
location ~* \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/phpfpm/nginx;
include ${pkgs.nginx}/conf/fastcgi_params;
include ${pkgs.nginx}/conf/fastcgi.conf;
}
'';
};
};
}; };
services.phpfpm.poolConfigs.mypool = '' services.phpfpm.poolConfigs.mypool = ''