Compare commits

...

3 commits

Author SHA1 Message Date
GaspardCulis
dcef2ee26d feat: Create services folder with test uptime-kuma service
First-try deploy yay
2024-09-27 15:57:06 +02:00
GaspardCulis
000b708e81 feat(OVHCloud): Setup example caddy virtualHost 2024-09-27 15:41:13 +02:00
GaspardCulis
4283a215a1 chore(secrets): Updated OVHCloud secrets 2024-09-27 15:40:29 +02:00
5 changed files with 36 additions and 7 deletions

View file

@ -10,6 +10,7 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./sops.nix ./sops.nix
../../services
]; ];
# Nix # Nix

View file

@ -1,5 +1,6 @@
{ {
modulesPath, modulesPath,
config,
inputs, inputs,
pkgs, pkgs,
... ...
@ -22,11 +23,20 @@
}; };
# Proxy # Proxy
environment.systemPackages = with pkgs; [
nss.tools
];
services.caddy = { services.caddy = {
enable = true; enable = true;
package = inputs.caddy.packages.${pkgs.system}.caddy; package = inputs.caddy.packages.${pkgs.system}.caddy;
virtualHosts."localhost".extraConfig = '' virtualHosts."siuu.gasdev.fr".extraConfig = ''
respond "Hello, world!" respond "Hello, world!"
''; '';
}; };
systemd.services.caddy = {
serviceConfig = {
EnvironmentFile = config.sops.templates."caddy.env".path;
};
};
} }

View file

@ -1,8 +1,8 @@
caddy: caddy:
ovh_endpoint: ENC[AES256_GCM,data:VkchYxz0QK8=,iv:NufvzW2DCt2HE9rr3knzEP5urUtY+lhjNbVgy+NXSz4=,tag:EWwNRkx5VSuB4pgJ+JmBXQ==,type:str] ovh_endpoint: ENC[AES256_GCM,data:dTdfKCWE,iv:NnmdUyM9F8ujEIfEEl9WXGLY3zRpIy9BDeqs1frK+R0=,tag:1AblJqi2hKISXBqNdWybqQ==,type:str]
ovh_application_key: ENC[AES256_GCM,data:jq4=,iv:0Q+ZWrimJdbjqFeOD7cLjB6QeCAcfbp0FU/xC06uSto=,tag:n7jhp8xAQ73bmdNXPXx+jA==,type:str] ovh_application_key: ENC[AES256_GCM,data:48HzVrSa35qUSkLO7sbUwg==,iv:QfTRXsfTlgeoJdRJIph39EBbLynRNxH4DkFuuC06IuE=,tag:m8lJPHEEpK24MKUou0MTpw==,type:str]
ovh_application_secret: ENC[AES256_GCM,data:9YAF6xVN,iv:Rb/Bv33N4Gyxu4XNrDz5VuLT+aTojT3WoVJf+gyxDBk=,tag:nXWQRjfORJV6/CqFQpGmxQ==,type:str] ovh_application_secret: ENC[AES256_GCM,data:X+grjuPsaIRYUEZZyoL1Tqx55tNYpvovYsXEwB15+K0=,iv:b88NCbfxahkryBp6eey74hc2IBwLTbTBe001uVJHaKw=,tag:HDw8w4g5ZS4m8ePCvvwJqw==,type:str]
ovh_consumer_key: ENC[AES256_GCM,data:lwP6/kHp,iv:oNs4QuCqOSrawXGdEG5QO2ATTKqjg1x6C1SzRbgWm2E=,tag:piTViTsKIsp+SJ+P7a8znA==,type:str] ovh_consumer_key: ENC[AES256_GCM,data:oFLHB7obwz3F59Vt8LRxpKaHBjEaoYCrKLKPoqVHz4M=,iv:rXxR2Nv3YaT2QubZUqIi60RxaHe9ZaIT9hLiogbPVFw=,tag:5m+xXEUbN+a2fHCf+EXf9A==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@ -27,8 +27,8 @@ sops:
MFpMemF4MGg1bmVUeWV5N25LTUtyczQKss0x4zT1kyeRu+qenhrdbcPlU/p+yjVN MFpMemF4MGg1bmVUeWV5N25LTUtyczQKss0x4zT1kyeRu+qenhrdbcPlU/p+yjVN
y3j4eGpnwgc2rxSL9vkrrkzx/atUqUkgGU/YstszUrP6XKbJ+9ydpQ== y3j4eGpnwgc2rxSL9vkrrkzx/atUqUkgGU/YstszUrP6XKbJ+9ydpQ==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-09-26T13:50:20Z" lastmodified: "2024-09-26T14:24:37Z"
mac: ENC[AES256_GCM,data:swF5s4D2zyO1sRxoZnYQ5oNx9psl5YjW0afuozdqODObUvkVfHo5IClRZ3EOMsly5Hvr5If04TBVf2/qTQv7SVVr1jUpyVnirgY6l8SH/Fvp2JWYdgUYRUR9wdzTDfqmYwf+vIxP2o7kPKpVg4Ek0ipewIf/3XHfiFfKmDCea5c=,iv:VKsbK9gfdj68Xr44v2oL4YoljRfyyF+53s2bdyedPwA=,tag:8hQ8pHctHJa0Jbgk0ZChGg==,type:str] mac: ENC[AES256_GCM,data:ZogwRhz1TqI47baW9j6hJwooIfIQtSuAYWAz4gs6a+UocsHLl5+GasLZSOhQvlRsvz8Vcgp5AeLN0ehAOrDItT7SqvepdwelaJo/irS3Wq5MfM+jemZZtOUXzshq8rueffyV9Ra2JiiYqNtZQ2w8GtgjEdpwWgwbIhb0u7fheGM=,iv:X9MB2IQ1LdQNv/ldwbzF1q8LCXArDiWMk5fet1IOzaE=,tag:73JhlFP2gYI5l8Ml5e1maw==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.0 version: 3.9.0

5
services/default.nix Normal file
View file

@ -0,0 +1,5 @@
{
imports = [
./uptime-kuma
];
}

View file

@ -0,0 +1,13 @@
{...}: {
services.caddy.virtualHosts."uptime.gasdev.fr".extraConfig = ''
reverse_proxy http://127.0.0.1:3001
'';
virtualisation.oci-containers.containers = {
container-name = {
image = "docker.io/louislam/uptime-kuma:1";
autoStart = true;
ports = ["127.0.0.1:3001:3001"];
};
};
}