Drop kassandra modules
This commit is contained in:
parent
de02bb2c64
commit
6681838bcd
|
@ -22,7 +22,6 @@ in {
|
||||||
../../roles/coturn.nix
|
../../roles/coturn.nix
|
||||||
../../roles/go-neb.nix
|
../../roles/go-neb.nix
|
||||||
../../roles/laminar
|
../../roles/laminar
|
||||||
../../roles/kassandra-server.nix
|
|
||||||
../../roles/foundryvtt.nix
|
../../roles/foundryvtt.nix
|
||||||
../../roles/mailman.nix
|
../../roles/mailman.nix
|
||||||
../../roles/firefox-sync.nix
|
../../roles/firefox-sync.nix
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
{pkgs, ...}: let
|
|
||||||
serverPath = "/var/cache/gc-links/kassandra-server";
|
|
||||||
in {
|
|
||||||
systemd.services.kassandra = {
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
description = "Kassandra Server";
|
|
||||||
path = [pkgs.coreutils pkgs.taskwarrior];
|
|
||||||
serviceConfig = {
|
|
||||||
WorkingDirectory = serverPath;
|
|
||||||
ExecStart = "${serverPath}/backend -b '::1' ";
|
|
||||||
Restart = "always";
|
|
||||||
User = "maralorn";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -46,15 +46,7 @@ in {
|
||||||
echo "Result was: $RESULT"
|
echo "Result was: $RESULT"
|
||||||
'';
|
'';
|
||||||
contexts = {
|
contexts = {
|
||||||
"default.conf" = builtins.toFile "default.conf" "EXECUTORS=2";
|
"default.conf" = builtins.toFile "default.conf" "EXECUTORS=1";
|
||||||
"kassandra.conf" = builtins.toFile "kassandra.conf" ''
|
|
||||||
EXECUTORS=1
|
|
||||||
JOBS=kassandra
|
|
||||||
'';
|
|
||||||
"test-config.conf" = builtins.toFile "test-config.conf" ''
|
|
||||||
EXECUTORS=1
|
|
||||||
JOBS=test-config
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
path = [pkgs.git pkgs.nix pkgs.gnutar pkgs.gzip pkgs.openssh pkgs.laminar];
|
|
||||||
setup = ''
|
|
||||||
set -e
|
|
||||||
export PATH=${lib.makeBinPath path}:$PATH
|
|
||||||
'';
|
|
||||||
repo = "/var/www/fdroid";
|
|
||||||
deploy = "${
|
|
||||||
pkgs.writeShellScript "deploy" ''
|
|
||||||
systemctl restart kassandra
|
|
||||||
cd /var/cache/gc-links/kassandra-android
|
|
||||||
FILENAME=$(${pkgs.fd}/bin/fd .apk)
|
|
||||||
rm -f ${repo}/repo/*.apk
|
|
||||||
cp $FILENAME ${repo}/unsigned
|
|
||||||
cd ${repo}
|
|
||||||
export PATH=/run/current-system/sw/bin:$PATH
|
|
||||||
export ANDROID_HOME=${pkgs.androidsdk_9_0}/libexec/android-sdk
|
|
||||||
${pkgs.fdroidserver}/bin/fdroid publish
|
|
||||||
${pkgs.fdroidserver}/bin/fdroid update
|
|
||||||
''
|
|
||||||
}";
|
|
||||||
target = name: ''
|
|
||||||
${setup}
|
|
||||||
export HOME=$PWD
|
|
||||||
git clone git@localhost:kassandra2 .
|
|
||||||
git show -q
|
|
||||||
nix-build release.nix -A ${name} --builders '@/etc/nix/machines' --show-trace -o /var/cache/gc-links/$JOB
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
security.sudo.extraRules = [
|
|
||||||
{
|
|
||||||
commands = [
|
|
||||||
{
|
|
||||||
command = deploy;
|
|
||||||
options = ["NOPASSWD"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
users = ["laminar"];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
services.laminar.cfgFiles.jobs = {
|
|
||||||
"kassandra.run" = pkgs.writeShellScript "kassandra" ''
|
|
||||||
${setup}
|
|
||||||
echo Launching and waiting for jobs lib, app, android and server
|
|
||||||
export LAMINAR_REASON="Started kassandra build $JOB:#$RUN"
|
|
||||||
laminarc run kassandra-lib kassandra-android kassandra-app kassandra-server
|
|
||||||
/run/wrappers/bin/sudo ${deploy}
|
|
||||||
'';
|
|
||||||
"kassandra-lib.run" = pkgs.writeShellScript "kassandra-lib" (target "lib");
|
|
||||||
"kassandra-app.run" = pkgs.writeShellScript "kassandra-app" (target "app");
|
|
||||||
"kassandra-android.run" =
|
|
||||||
pkgs.writeShellScript "kassandra-android" (target "android");
|
|
||||||
"kassandra-server.run" =
|
|
||||||
pkgs.writeShellScript "kassandra-server" (target "server");
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue