Fix typos, working agenix and grafana config

This commit is contained in:
Théo Barnouin 2024-10-23 16:45:46 +02:00
parent 33a47b21a7
commit 606ca3c6c1
2 changed files with 9 additions and 6 deletions

View file

@ -56,6 +56,7 @@
nginx = nixpkgs.lib.nixosSystem { nginx = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" "${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
"${inputs.self}/services" "${inputs.self}/services"
{ {
@ -89,6 +90,7 @@
jellyfin = nixpkgs.lib.nixosSystem { jellyfin = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
microvm.nixosModules.microvm microvm.nixosModules.microvm
"${inputs.self}/systems" "${inputs.self}/systems"
"${inputs.self}/services" "${inputs.self}/services"
@ -110,6 +112,7 @@
redis = nixpkgs.lib.nixosSystem { redis = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
"${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix" "${inputs.nixpkgs}/nixos/modules/virtualisation/proxmox-lxc.nix"
"${inputs.self}/services" "${inputs.self}/services"
{ {
@ -145,12 +148,14 @@
grafana = nixpkgs.lib.nixosSystem { grafana = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
microvm.nixosModules.microvm microvm.nixosModules.microvm
"${inputs.self}/systems" "${inputs.self}/systems"
"${inputs.self}/services" "${inputs.self}/services"
{ {
services.vm_grafana = { services.vm_grafana = {
enable = true; enable = true;
vm_ip = "192.168.1.27";
proxy_ip = proxy_host; proxy_ip = proxy_host;
pgsql_ip = pgsql_host; pgsql_ip = pgsql_host;
}; };
@ -168,6 +173,7 @@
netbox = nixpkgs.lib.nixosSystem { netbox = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
microvm.nixosModules.microvm microvm.nixosModules.microvm
"${inputs.self}/systems" "${inputs.self}/systems"
"${inputs.self}/services" "${inputs.self}/services"
@ -189,6 +195,7 @@
authentik = nixpkgs.lib.nixosSystem { authentik = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
agenix.nixosModules.default
inputs.authentik-nix.nixosModules.default inputs.authentik-nix.nixosModules.default
{ {
services.authentik = { services.authentik = {

View file

@ -21,13 +21,9 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
age.secrets.grafana-db = { age.secrets.grafana-db = {
file = ./secrets/grafana-db.age; file = ./secrets/grafana-db.age;
mode = "0660";
owner = "grafana"; owner = "grafana";
}; };
age.secrets.kuma-token = { age.secrets.kuma-token.file = ./secrets/kuma-token.age;
file = ./secrets/kuma-token.age;
mode = "0660";
};
services.rsyslogd = { services.rsyslogd = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
@ -61,7 +57,7 @@ in
host = "${cfg.pgsql_ip}:5432"; host = "${cfg.pgsql_ip}:5432";
name = "grafana"; name = "grafana";
user = "grafana"; user = "grafana";
password = "\$__file{${config.age.secrets.grafana-db.path}"; password = "\$__file{${config.age.secrets.grafana-db.path}}";
}; };
}; };
}; };