feat(koi): pcre-sub-bot hosted
This commit is contained in:
parent
465725894c
commit
a6a2482aac
3 changed files with 46 additions and 3 deletions
|
@ -27,6 +27,7 @@
|
|||
./containers/sharkey
|
||||
./containers/pds
|
||||
./containers/zond
|
||||
./containers/bots/pcre-sub-bot.nix
|
||||
./vms/hass.nix
|
||||
./vms/bnuuy.nix
|
||||
# ./vms/windows.nix
|
||||
|
@ -75,9 +76,8 @@
|
|||
allowedBridges = [ "br0" ];
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
options kvm_amd avic=1 nested=0
|
||||
|
|
36
hosts/koi/containers/bots/pcre-sub-bot.nix
Normal file
36
hosts/koi/containers/bots/pcre-sub-bot.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ abs, config, ... }:
|
||||
|
||||
let
|
||||
secrets = import (abs "lib/secrets.nix");
|
||||
|
||||
UID = 1101;
|
||||
in {
|
||||
imports = [
|
||||
(secrets.declare [{
|
||||
name = "pcresub-bot-env";
|
||||
owner = "pcre-sub-bot";
|
||||
}])
|
||||
];
|
||||
|
||||
users.groups.pcre-sub-bot = {};
|
||||
users.users.pcre-sub-bot = {
|
||||
group = "pcre-sub-bot";
|
||||
isNormalUser = true;
|
||||
uid = UID;
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.pcre-sub-bot = {
|
||||
image = "ghcr.io/teidesu/pcre-sub-bot:sha-d010ea7@sha256:d30a1adf852f1953bb4015d55f0031a41bd65657abc4880ecd1dfcb67a77a678";
|
||||
volumes = [
|
||||
"/srv/pcre-sub-bot:/app/bot-data"
|
||||
];
|
||||
environmentFiles = [
|
||||
(secrets.file config "pcresub-bot-env")
|
||||
];
|
||||
user = builtins.toString UID;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /srv/pcre-sub-bot 0777 pcre-sub-bot pcre-sub-bot -"
|
||||
];
|
||||
}
|
7
secrets/pcresub-bot-env.age
Normal file
7
secrets/pcresub-bot-env.age
Normal file
|
@ -0,0 +1,7 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 sj88Xw dS5IBa9GylKmRN5qjkcH8r6Zf1X9f/3ulsWqeeTDsxk
|
||||
LrhgkPSkURf6XdV1zt3BdfVXhjbB4L1CbXfi+ANHzoA
|
||||
--- u5wPM3DOfKBoYvsbTFo5xhe6liFVkwwfV2pAFF2Za6k
|
||||
e¼ò>2™
5šV}áYi´…Ìo™£3†%Rlx'ó²6ÞעS»ç%,äQ”F‘ÊA”êÂHr˜
|
||||
}ìWýLR.0S·HhWŽñÚ»ïô¯³ÑU3ôŸ©0YiÎÄ&<±/@åÅÖøXÌŒHÑF-bpvë<76>TQÊ_“íK’ÅzOæÁñ¦¿›õv&¯Òj¡o
|
||||
cýÈÊ‹ƒ¹qY?p
|
Loading…
Reference in a new issue