From e294fecf7e886963003fccb03e34c2f77a29fba8 Mon Sep 17 00:00:00 2001 From: kalipso Date: Fri, 11 Apr 2025 18:18:30 +0200 Subject: [PATCH] [zineshop] init --- flake.lock | 57 +++++++++++++++++++++++++++- flake.nix | 5 +++ machines/hosts.nix | 8 ++++ machines/overwatch/configuration.nix | 6 +++ machines/zineshop/configuration.nix | 30 +++++++++++++++ 5 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 machines/zineshop/configuration.nix diff --git a/flake.lock b/flake.lock index 98a258a..1d4d759 100644 --- a/flake.lock +++ b/flake.lock @@ -235,7 +235,8 @@ "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix", "tasklist": "tasklist", - "utils": "utils_3" + "utils": "utils_3", + "zineshop": "zineshop" } }, "sops-nix": { @@ -334,6 +335,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tasklist": { "inputs": { "nixpkgs": [ @@ -407,6 +423,45 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_4": { + "inputs": { + "systems": "systems_5" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "zineshop": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": "utils_4" + }, + "locked": { + "lastModified": 1744380401, + "narHash": "sha256-FXY8CjzYtNUFk47q9zrd/4X2kpwmdfRQjofmsMdDEqM=", + "ref": "refs/heads/master", + "rev": "1da5e3e8b47ba740a9dbcd8975aad4181abd6629", + "revCount": 60, + "type": "git", + "url": "https://git.dynamicdiscord.de/kalipso/zineshop" + }, + "original": { + "type": "git", + "url": "https://git.dynamicdiscord.de/kalipso/zineshop" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 02dd232..6ecb223 100644 --- a/flake.nix +++ b/flake.nix @@ -22,6 +22,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + zineshop = { + url = "git+https://git.dynamicdiscord.de/kalipso/zineshop"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + ep3-bs = { url = "git+https://git.dynamicdiscord.de/kalipso/ep3-bs.nix"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/machines/hosts.nix b/machines/hosts.nix index f780fc3..41dee83 100644 --- a/machines/hosts.nix +++ b/machines/hosts.nix @@ -67,6 +67,14 @@ }; }; + zineshop = { + type = "microvm"; + network = { + address = "10.0.0.15"; + mac = "D0:E5:CA:F0:D7:F1"; + }; + }; + testvm = { type = "host"; }; diff --git a/machines/overwatch/configuration.nix b/machines/overwatch/configuration.nix index 62e1b8a..75ed016 100644 --- a/machines/overwatch/configuration.nix +++ b/machines/overwatch/configuration.nix @@ -107,6 +107,12 @@ with lib; targets = [ "10.0.0.13:9002" ]; }]; } + { + job_name = "zineshop"; + static_configs = [{ + targets = [ "10.0.0.15:9002" ]; + }]; + } { job_name = "fanny"; static_configs = [{ diff --git a/machines/zineshop/configuration.nix b/machines/zineshop/configuration.nix new file mode 100644 index 0000000..c885569 --- /dev/null +++ b/machines/zineshop/configuration.nix @@ -0,0 +1,30 @@ +{ self, config, lib, pkgs, inputs, ... }: + +with lib; + +{ + networking = { + hostName = mkDefault "zineshop"; + useDHCP = false; + }; + + imports = [ + inputs.malobeo.nixosModules.malobeo.metrics + inputs.zineshop.nixosModules.zineshop + ../modules/malobeo_user.nix + ../modules/sshd.nix + ]; + + malobeo.metrics = { + enable = true; + enablePromtail = true; + logNginx = true; + lokiHost = "10.0.0.14"; + }; + + services.zineshop.enable = true; + networking.firewall.allowedTCPPorts = [ 8080 ]; + + system.stateVersion = "22.11"; # Did you read the comment? +} +