From e9787c181b716c277ba5f10e2db2d1d6fe014a1d Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 26 Jan 2023 14:27:19 +0100 Subject: [PATCH] fix internal.xirion.net kubernetes resource naming --- flake.lock | 20 ++++++++--------- flake.nix | 2 +- flux/olympus/apps/websites/internal.yaml | 18 +++++++-------- nixos/hosts/olympus/synapse/configuration.nix | 22 +++++++++++++++++++ 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 93b617f..02ceb08 100644 --- a/flake.lock +++ b/flake.lock @@ -453,11 +453,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1674604320, - "narHash": "sha256-yhSiPmT3fmOaV2dLBNCsGGpN4t2Ucs6Q3dGygBH34sc=", + "lastModified": 1674661101, + "narHash": "sha256-iFFUngau5KHjsKScLhovpb7kCMjJvw/mXXOj6I62sVM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "12e293e3092b03dbb9d82e7a749f482ef2b7ea6e", + "rev": "fc89e70a1fb74429ad0f772d399325f69e65b357", "type": "github" }, "original": { @@ -688,11 +688,11 @@ ] }, "locked": { - "lastModified": 1672682641, - "narHash": "sha256-940TLvtdT8YKuP5nXcPhUfNeK0A/leSjjG8hfqvWM84=", + "lastModified": 1674666581, + "narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "30516cb2b01896e14ce66893e414b6e3eec71cac", + "rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa", "type": "github" }, "original": { @@ -800,16 +800,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1674556162, - "narHash": "sha256-X5b93+HMdyDqo+loT6Z7bIhaHUhSqVTw/T0lNrlZbvw=", + "lastModified": 1674459583, + "narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "353e2d957c7421cae4e3ab42739a0997ea7e310f", + "rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable-small", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 3298804..165dd66 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ # * https://github.com/Infinidoge/nix-minecraft inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs_22-11.url = "github:nixos/nixpkgs/nixos-22.11"; nur.url = "github:nix-community/NUR"; diff --git a/flux/olympus/apps/websites/internal.yaml b/flux/olympus/apps/websites/internal.yaml index 6a59942..f908e7a 100644 --- a/flux/olympus/apps/websites/internal.yaml +++ b/flux/olympus/apps/websites/internal.yaml @@ -4,31 +4,31 @@ metadata: name: internal namespace: websites labels: - app: internal.xirion.net + app: internal spec: replicas: 1 selector: matchLabels: - app: internal.xirion.net + app: internal template: metadata: labels: - app: internal.xirion.net + app: internal spec: containers: - - name: internal.xirion.net - image: git.0x76.dev/v/internal.xirion.net:1 + - name: internal + image: git.0x76.dev/v/internal:1 ports: - containerPort: 8080 --- apiVersion: v1 kind: Service metadata: - name: internal.xirion.net + name: internal namespace: websites spec: selector: - app: internal.xirion.net + app: internal ports: - protocol: TCP port: 8080 @@ -36,7 +36,7 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: internal.xirion.net + name: internal namespace: websites spec: rules: @@ -47,6 +47,6 @@ spec: pathType: Prefix backend: service: - name: internal.xirion.net + name: internal port: number: 8080 diff --git a/nixos/hosts/olympus/synapse/configuration.nix b/nixos/hosts/olympus/synapse/configuration.nix index 0e812da..cd52871 100644 --- a/nixos/hosts/olympus/synapse/configuration.nix +++ b/nixos/hosts/olympus/synapse/configuration.nix @@ -54,6 +54,27 @@ in ]; settings = + let log_file = pkgs.writeText "log.yml" '' +version: 1 + +formatters: + structured: + class: synapse.logging.TerseJsonFormatter + +handlers: + file: + class: logging.handlers.TimedRotatingFileHandler + formatter: structured + filename: /var/lib/matrix-synapse/synapse.log + when: midnight + backupCount: 3 # Does not include the current log file. + encoding: utf8 + +loggers: + synapse: + level: INFO + handlers: [file] + ''; in { server_name = "meowy.tech"; enable_registration = true; @@ -64,6 +85,7 @@ in media_retention = { remote_media_lifetime = "90d"; }; + log_config = "${log_file}"; listeners = [ { inherit port;