pkgs/wetter: remove package
This commit is contained in:
parent
52582895cf
commit
f34337159d
@ -112,7 +112,6 @@
|
||||
};
|
||||
in {
|
||||
inherit (pkgs)
|
||||
flask-excel
|
||||
iot-data
|
||||
nixfiles-add-secret
|
||||
nixfiles-auto-install
|
||||
@ -121,11 +120,8 @@
|
||||
nixfiles-system-upgrade
|
||||
nixfiles-updated-inputs
|
||||
nixfiles-update-ssh-host-keys
|
||||
pyexcel-xlsx
|
||||
pyexcel-webio
|
||||
update-from-hydra
|
||||
uptimestatus
|
||||
wetter;
|
||||
});
|
||||
|
||||
hydraJobs = {
|
||||
|
@ -1,90 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
configFile = pkgs.writeText "wetter.cfg" ''
|
||||
SQLALCHEMY_DATABASE_URI="postgresql://wetter_web@/wetter?host=/run/postgresql"
|
||||
'';
|
||||
|
||||
in {
|
||||
users.users.wetter = {
|
||||
description = "Wetter Service";
|
||||
group = "wetter";
|
||||
home = "/var/lib/wetter/";
|
||||
useDefaultShell = true;
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.wetter = {};
|
||||
|
||||
users.users.wetter_web = {
|
||||
description = "Wetter Web Service";
|
||||
group = "wetter_web";
|
||||
home = "/var/lib/wetter/";
|
||||
useDefaultShell = true;
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.wetter_web = {};
|
||||
|
||||
users.users.wetter_scraper = {
|
||||
description = "Wetter Scraper";
|
||||
group = "wetter_scraper";
|
||||
home = "/var/lib/wetter/";
|
||||
useDefaultShell = true;
|
||||
isSystemUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4kCYnm6mnPI3nPF5YmYCxeVqL4i02dSIJ9kngxu9rS dwd-scraper"
|
||||
];
|
||||
};
|
||||
users.groups.wetter_scraper = {};
|
||||
|
||||
services.postgresql = {
|
||||
ensureDatabases = [ "wetter" ];
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "wetter";
|
||||
ensurePermissions = {
|
||||
"DATABASE wetter" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "wetter_scraper";
|
||||
ensurePermissions = {
|
||||
"DATABASE wetter" = "CONNECT";
|
||||
"SCHEMA public" = "USAGE";
|
||||
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "wetter_web";
|
||||
ensurePermissions = {
|
||||
"DATABASE wetter" = "CONNECT";
|
||||
"SCHEMA public" = "USAGE";
|
||||
"ALL TABLES IN SCHEMA public" = "SELECT";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# systemd.services.wetter = {
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# serviceConfig = {
|
||||
# RuntimeDirectory = "wetter";
|
||||
# StateDirectory = "wetter";
|
||||
# User = "wetter_web";
|
||||
# Group = "wetter_web";
|
||||
# };
|
||||
# environment = {
|
||||
# WETTER_SETTINGS = "${configFile}";
|
||||
# };
|
||||
# script = "gunicorn -w 4 -b [::1]:8234 wetter:app";
|
||||
# path = with pkgs; [ (python3.withPackages (ps: [ ps.gunicorn wetter ])) ];
|
||||
# };
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
"wetter.clerie.de" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
#proxyPass = "http://[::1]:8234";
|
||||
return = ''200 "wetter.clerie.de is currently offline, find source code on https://git.clerie.de/clerie/wetter\n"'';
|
||||
extraConfig = ''
|
||||
types { } default_type "text/plain; charset=utf-8";
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ buildPythonPackage, fetchPypi, pyexcel-webio, flask }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Flask-Excel";
|
||||
version = "0.0.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "b82ddfe6319ecf2f796ada9966737ac8eaf9a99d6bce773f8acdc08acd7e9fae";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyexcel-webio flask
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
final: prev: {
|
||||
flask-excel = final.python3.pkgs.callPackage ./flask-excel {};
|
||||
iot-data = final.python3.pkgs.callPackage ./iot-data {};
|
||||
nixfiles-add-secret = final.callPackage ./nixfiles/nixfiles-add-secret.nix {};
|
||||
nixfiles-auto-install = final.callPackage ./nixfiles/nixfiles-auto-install.nix {};
|
||||
@ -8,11 +7,6 @@ final: prev: {
|
||||
nixfiles-system-upgrade = final.callPackage ./nixfiles/nixfiles-system-upgrade.nix {};
|
||||
nixfiles-updated-inputs = final.callPackage ./nixfiles/nixfiles-updated-inputs.nix {};
|
||||
nixfiles-update-ssh-host-keys = final.callPackage ./nixfiles/nixfiles-update-ssh-host-keys.nix {};
|
||||
pyexcel-xlsx = final.python3.pkgs.callPackage ./pyexcel-xlsx {};
|
||||
pyexcel-webio = final.python3.pkgs.callPackage ./pyexcel-webio {};
|
||||
update-from-hydra = final.callPackage ./update-from-hydra {};
|
||||
uptimestatus = final.python3.pkgs.callPackage ./uptimestatus {};
|
||||
wetter = final.python3.pkgs.callPackage ./wetter {
|
||||
inherit (final) pkg-config libsass;
|
||||
};
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
{ buildPythonPackage, fetchPypi, pyexcel }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyexcel-webio";
|
||||
version = "0.1.4";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "039538f1b35351f1632891dde29ef4d7fba744e217678ebb5a501336e28ca265";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pyexcel
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
{ buildPythonPackage, fetchPypi, openpyxl, pyexcel-io }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyexcel-xlsx";
|
||||
version = "0.6.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "55754f764252461aca6871db203f4bd1370ec877828e305e6be1de5f9aa6a79d";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
openpyxl pyexcel-io
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
flask,
|
||||
flask_sqlalchemy,
|
||||
lib,
|
||||
libsass,
|
||||
yarn2nix-moretea,
|
||||
nodejs,
|
||||
pkg-config,
|
||||
psycopg2,
|
||||
python3,
|
||||
stdenv,
|
||||
flask-excel,
|
||||
pyexcel-xlsx,
|
||||
}:
|
||||
|
||||
let
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://git.clerie.de/clerie/wetter.git";
|
||||
rev = "3193c6d507af5d6f5d62c23046b7fbf0c638ddb4";
|
||||
sha256 = "sha256-ouUmmw020jKg/SRlYhGBFRw/atxW+atQ1JSTFQNi5iw=";
|
||||
};
|
||||
pname = "wetter";
|
||||
version = "0.0.1";
|
||||
|
||||
packageJSON = src + "/package.json";
|
||||
yarnLock = src + "/yarn.lock";
|
||||
|
||||
modules = yarn2nix-moretea.mkYarnModules {
|
||||
pname = "${pname}-modules";
|
||||
name = "${pname}-modules-${version}";
|
||||
inherit version packageJSON yarnLock;
|
||||
|
||||
/* build native node-sass extensions */
|
||||
pkgConfig.node-sass = {
|
||||
buildInputs = [ python3 libsass pkg-config ];
|
||||
postInstall = ''
|
||||
export npm_config_nodedir=${nodejs}
|
||||
LIBSASS_EXT=auto yarn --offline run build
|
||||
rm build/config.gypi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
assets = stdenv.mkDerivation {
|
||||
inherit src pname version;
|
||||
|
||||
NODE_ENV = "production";
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
ln -s ${modules}/node_modules
|
||||
node_modules/.bin/rollup -c
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
cp -r wetter/static/bundle $out
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
in buildPythonPackage rec {
|
||||
inherit src pname version;
|
||||
|
||||
propagatedBuildInputs = [
|
||||
flask
|
||||
flask_sqlalchemy
|
||||
psycopg2
|
||||
flask-excel
|
||||
pyexcel-xlsx
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/${python3.sitePackages}/wetter/static
|
||||
cp -r ${assets} $out/${python3.sitePackages}/wetter/static/bundle
|
||||
cp -r wetter/templates $out/${python3.sitePackages}/wetter/templates
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
}
|
Loading…
Reference in New Issue
Block a user