update module
This commit is contained in:
parent
2c095ff8c0
commit
b2890353c1
3 changed files with 74 additions and 56 deletions
17
favicon.svg
17
favicon.svg
|
|
@ -1 +1,16 @@
|
|||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0%" stop-color="#667eea"/>
|
||||
<stop offset="100%" stop-color="#764ba2"/>
|
||||
</linearGradient>
|
||||
<filter id="s" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feDropShadow dx="0" dy="8" stdDeviation="10" flood-color="#000" flood-opacity="0.2"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<rect x="16" y="16" width="224" height="224" rx="48" fill="url(#g)" filter="url(#s)"/>
|
||||
<g fill="#fff" stroke="none" transform="translate(64,64)">
|
||||
<path d="M64 0c35.3 0 64 28.7 64 64s-28.7 64-64 64S0 99.3 0 64 28.7 0 64 0zm0 16C37.5 16 16 37.5 16 64s21.5 48 48 48 48-21.5 48-48S90.5 16 64 16z" opacity="0.2"/>
|
||||
<path d="M28 88V24h68v16H48v16h40v16H48v16h48v16z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1 B After Width: | Height: | Size: 841 B |
|
|
@ -30,7 +30,7 @@
|
|||
installPhase = ''
|
||||
install -Dm755 ${./fragify.py} $out/bin/fragify
|
||||
mkdir -p $out/share/fragify
|
||||
cp -r ${./templates} $out/share/fragify/
|
||||
cp -r ${./templates} $out/share/fragify/templates
|
||||
# Provide a WSGI entry file for uWSGI to load
|
||||
install -Dm644 ${./fragify.py} $out/share/fragify/fragify_wsgi.py
|
||||
# Install built assets if present
|
||||
|
|
|
|||
13
module.nix
13
module.nix
|
|
@ -21,21 +21,22 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# global uwsgi settings (once)
|
||||
services.uwsgi = {
|
||||
enable = true;
|
||||
plugins = [ "python3" ];
|
||||
# run the emperor
|
||||
|
||||
instance = {
|
||||
type = "emperor";
|
||||
vassals = {
|
||||
fragify = {
|
||||
type = "normal";
|
||||
chdir = "/";
|
||||
wsgi-file = "${pkgs.fragify}/share/fragify/fragify_wsgi.py";
|
||||
module = "fragify:app";
|
||||
|
||||
module = "fragify_wsgi:app";
|
||||
|
||||
socket = "unix:${config.services.uwsgi.runDir}/fragify.sock";
|
||||
"chmod-socket" = "660";
|
||||
|
||||
umask = "0077";
|
||||
vacuum = true;
|
||||
master = true;
|
||||
|
|
@ -45,11 +46,13 @@ in
|
|||
"buffer-size" = 65535;
|
||||
need-app = true;
|
||||
"no-orphans" = true;
|
||||
|
||||
env = [
|
||||
"PYTHONPATH=${pkgs.fragify.pythonPath}"
|
||||
"PYTHONPATH=${pkgs.fragify}/share/fragify:${pkgs.fragify.pythonPath}"
|
||||
"FRAGIFY_TEMPLATES_DIR=${pkgs.fragify}/share/fragify/templates"
|
||||
"FRAGIFY_STATIC_DIR=${pkgs.fragify}/share/fragify/assets"
|
||||
];
|
||||
|
||||
settings = {
|
||||
"static-map" = "/static=${pkgs.fragify}/share/fragify/assets";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue