feat: moar nix
This commit is contained in:
parent
7e3bf4d6f3
commit
2025eb74a4
23 changed files with 1408 additions and 15 deletions
44
config/services/kener.nix
Normal file
44
config/services/kener.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.kener;
|
||||
src = builtins.fetchTarball {
|
||||
url = "https://github.com/rajnandan1/kener/archive/refs/tags/3.2.12.tar.gz";
|
||||
sha256 = "sha256:0a301jz8vqi2bd93k4lyabinshvadz084jfnkzrmxqrfr7w9gqbl";
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
services.kener = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Kener.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.kener =
|
||||
let
|
||||
kener = (pkgs.callPackage ./kener-pkg.nix {});
|
||||
in {
|
||||
path = [
|
||||
pkgs.nodejs
|
||||
pkgs.unixtools.ping
|
||||
];
|
||||
environment = {
|
||||
"DATABASE_URL" = "sqlite:///opt/kener/kener.db";
|
||||
"ORIGIN" = "https://amy.mov";
|
||||
"KENER_SECRET_KEY" = "my-super-strong-key";
|
||||
};
|
||||
name = "kener.service";
|
||||
enable = true;
|
||||
script = "node ${kener}/main.js";
|
||||
description = "Kener";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue