mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
:tom:
This commit is contained in:
parent
f1b44ee910
commit
63c3c97d7c
9 changed files with 54 additions and 27 deletions
|
|
@ -27,6 +27,10 @@
|
||||||
dnsutils
|
dnsutils
|
||||||
];
|
];
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
"${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz"}/modules/age.nix" # main 2024-07-26
|
||||||
|
];
|
||||||
|
|
||||||
time.timeZone = "Europe/Zurich";
|
time.timeZone = "Europe/Zurich";
|
||||||
users.users.root.openssh.authorizedKeys.keys = [ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP nilsh@PC-Nils'' ];
|
users.users.root.openssh.authorizedKeys.keys = [ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP nilsh@PC-Nils'' ];
|
||||||
|
|
||||||
|
|
@ -113,8 +117,11 @@
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
./modules/ingress
|
./modules/ingress
|
||||||
|
./modules/widetom
|
||||||
];
|
];
|
||||||
|
|
||||||
|
age.secrets.docker_registry_password.file = ./secrets/docker_registry_password.age;
|
||||||
|
|
||||||
# The name and nodes parameters are supported in Colmena,
|
# The name and nodes parameters are supported in Colmena,
|
||||||
# allowing you to reference configurations in other nodes.
|
# allowing you to reference configurations in other nodes.
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
|
|
|
||||||
33
newinfra/nix/modules/widetom/default.nix
Normal file
33
newinfra/nix/modules/widetom/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
age.secrets.widetom_bot_token.file = ../../secrets/widetom_bot_token.age;
|
||||||
|
age.secrets.widetom_config_toml.file = ../../secrets/widetom_config_toml.age;
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers = {
|
||||||
|
/*
|
||||||
|
container_name: widetom
|
||||||
|
image: "docker.nilstrieb.dev/widetom:33d17387"
|
||||||
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- "/apps/widetom:/app/config"
|
||||||
|
environment:
|
||||||
|
CONFIG_PATH: /app/config/config.toml
|
||||||
|
BOT_TOKEN_PATH: /app/config/bot_token
|
||||||
|
*/
|
||||||
|
widetom = {
|
||||||
|
image = "docker.nilstrieb.dev/widetom:33d17387";
|
||||||
|
volumes = [
|
||||||
|
"${config.age.secrets.widetom_config_toml.path}:/config.toml"
|
||||||
|
"${config.age.secrets.widetom_bot_token.path}:/token"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
CONFIG_PATH = "/config.toml";
|
||||||
|
BOT_TOKEN_PATH = "/token";
|
||||||
|
};
|
||||||
|
login = {
|
||||||
|
registry = "docker.nilstrieb.dev";
|
||||||
|
username = "nils";
|
||||||
|
passwordFile = config.age.secrets.docker_registry_password.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
newinfra/nix/secrets/docker_registry_password.age
Normal file
5
newinfra/nix/secrets/docker_registry_password.age
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 cVCt6g AAbb0ErTvg38WthfQ3l812GEevHWHclMOyFaPj4+GT0
|
||||||
|
Rd83XSOPBQQVfCur8qOpMAxl0G25Obg/d4sLWW86Qb4
|
||||||
|
--- fRS0N8vuoOh7BdE2mcDZrQJDwN+MgTwmYWfYDDvwFnY
|
||||||
|
Ni:l÷"½03Ç4‚²}zØV„òàžÖÁXÜ-†z—Øð(k'Åæf[”÷>ôÐþáî¢ý®
|
||||||
8
newinfra/nix/secrets/secrets.nix
Normal file
8
newinfra/nix/secrets/secrets.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
let
|
||||||
|
vps1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOixcV3SGAWRCMYYn+ybioFSBhpfkYzSU1nX+g6e5jI5";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"widetom_bot_token.age".publicKeys = [ vps1 ];
|
||||||
|
"widetom_config_toml.age".publicKeys = [ vps1 ];
|
||||||
|
"docker_registry_password.age".publicKeys = [ vps1 ];
|
||||||
|
}
|
||||||
BIN
newinfra/nix/secrets/widetom_bot_token.age
Normal file
BIN
newinfra/nix/secrets/widetom_bot_token.age
Normal file
Binary file not shown.
BIN
newinfra/nix/secrets/widetom_config_toml.age
Normal file
BIN
newinfra/nix/secrets/widetom_config_toml.age
Normal file
Binary file not shown.
|
|
@ -63,24 +63,6 @@
|
||||||
src: "../secrets/registry/htpasswd"
|
src: "../secrets/registry/htpasswd"
|
||||||
mode: "u=r,g=r,o=r"
|
mode: "u=r,g=r,o=r"
|
||||||
#####
|
#####
|
||||||
# APP: widetom, /apps/widetom
|
|
||||||
#####
|
|
||||||
- name: Create /apps/widetom
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "/apps/widetom"
|
|
||||||
state: directory
|
|
||||||
mode: u=rwx,g=rx,o=rx
|
|
||||||
- name: Copy widetom config.toml
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "/apps/widetom/config.toml"
|
|
||||||
src: "../secrets/widetom/config.toml"
|
|
||||||
mode: "u=r,g=r,o=r"
|
|
||||||
- name: Copy widetom bot_token
|
|
||||||
ansible.builtin.copy:
|
|
||||||
dest: "/apps/widetom/bot_token"
|
|
||||||
src: "../secrets/widetom/bot_token"
|
|
||||||
mode: "u=r,g=r,o=r"
|
|
||||||
#####
|
|
||||||
# APP: killua bot, /apps/killua
|
# APP: killua bot, /apps/killua
|
||||||
#####
|
#####
|
||||||
- name: Create /apps/killua
|
- name: Create /apps/killua
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,6 @@
|
||||||
shellcheck
|
shellcheck
|
||||||
git-crypt
|
git-crypt
|
||||||
opentofu
|
opentofu
|
||||||
|
(import (builtins.fetchTarball "https://github.com/ryantm/agenix/archive/de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6.tar.gz") { }).agenix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,6 @@ services:
|
||||||
- "/apps/prometheus/data:/opt/bitnami/prometheus/data"
|
- "/apps/prometheus/data:/opt/bitnami/prometheus/data"
|
||||||
networks:
|
networks:
|
||||||
- prometheus
|
- prometheus
|
||||||
widetom:
|
|
||||||
container_name: widetom
|
|
||||||
image: "docker.nilstrieb.dev/widetom:33d17387"
|
|
||||||
restart: always
|
|
||||||
volumes:
|
|
||||||
- "/apps/widetom:/app/config"
|
|
||||||
environment:
|
|
||||||
CONFIG_PATH: /app/config/config.toml
|
|
||||||
BOT_TOKEN_PATH: /app/config/bot_token
|
|
||||||
killua:
|
killua:
|
||||||
container_name: killua
|
container_name: killua
|
||||||
image: "docker.nilstrieb.dev/killua-bot:ac8203d2"
|
image: "docker.nilstrieb.dev/killua-bot:ac8203d2"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue