Migrate osmium
parent
525845c534
commit
b83e8c2d46
@ -0,0 +1 @@
|
||||
rKm3gedo1rHXcKVnZTjKFVJhqbcPTyH1Z1irfcAH8TB
|
@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
/* Begin hardware configuration section */
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
swapDevices = [ ];
|
||||
nix.maxJobs = pkgs.lib.mkDefault 2;
|
||||
/* End hardware configuration section */
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/cf472470-0b3d-414b-93f8-b5e4298fad05";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
defaultGateway6 = "2a01:4a0:4a::1";
|
||||
interfaces.ens3 = {
|
||||
ipv6.addresses = [{
|
||||
address = "2a01:4a0:4a:5d::35c7";
|
||||
prefixLength = 48;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.grub.device = lib.mkForce "/dev/vda";
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{ serviceName, binaryPath, errorPath, from, to }:
|
||||
let
|
||||
daemon = import ./daemon.nix;
|
||||
configurationFile = builtins.toFile "error-reporter-config.json" (builtins.toJSON {
|
||||
errorPath = errorPath;
|
||||
stackFilter = "*";
|
||||
subjectFormat = "UNHANDLED ERROR: $type - $message";
|
||||
metadata = {
|
||||
from = from;
|
||||
to = to;
|
||||
};
|
||||
});
|
||||
in { pkgs, lib, ... }: {
|
||||
imports = [
|
||||
(daemon {
|
||||
name = "${serviceName}-error-reporter";
|
||||
displayName = "${serviceName} Error Reporter";
|
||||
fakeHome = false;
|
||||
binaryPath = "${binaryPath} ${configurationFile}";
|
||||
environmentVariables = {};
|
||||
prepare = ''
|
||||
mkdir -m 0700 -p ${errorPath}
|
||||
chown ${serviceName} ${errorPath}
|
||||
'';
|
||||
before = [ "${serviceName}.service" ];
|
||||
})
|
||||
];
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
{ pkgs, errorPath, ... }:
|
||||
let
|
||||
configuration = builtins.toFile "pastebin-stream-config.json" (builtins.toJSON {
|
||||
errors = {
|
||||
directory = errorPath;
|
||||
};
|
||||
|
||||
scraperSettings = {
|
||||
pastebinCom = {
|
||||
listInterval = 60;
|
||||
listLimit = 100;
|
||||
pasteInterval = 1;
|
||||
};
|
||||
};
|
||||
});
|
||||
in pkgs.cryto.nodeApplication {
|
||||
name = "pastebin-stream";
|
||||
source = pkgs.stdenv.mkDerivation {
|
||||
name = "pastebin-stream-application";
|
||||
src = pkgs.cryto.fetchFromCrytoGit {
|
||||
owner = "joepie91";
|
||||
repo = "pastebin-stream";
|
||||
rev = "40615402511bf6655f8420dd5f0908dfbcf7a406";
|
||||
sha256 = "1qkqbldgr3lwv8xq6mijzwv7kcnpp54x695dp6i6bm4skijyzqnm";
|
||||
};
|
||||
|
||||
# TODO: Move this logic into fetchFromCrytoGit somehow
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
tar --strip-components=1 -xzvf $src -C $out
|
||||
cp ${configuration} $out/config.json
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue