From 5f1b91a81b0f38708839a1d758348e4dd9bddf5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Sat, 25 Feb 2023 21:33:34 +0100 Subject: [PATCH] More changes --- hosts/0001/0001.nix | 1 + hosts/0001/drone.nix | 110 ------------------------------------ users/barkeeper/default.nix | 13 ++--- 3 files changed, 6 insertions(+), 118 deletions(-) delete mode 100644 hosts/0001/drone.nix diff --git a/hosts/0001/0001.nix b/hosts/0001/0001.nix index b2755b89..02990f8f 100644 --- a/hosts/0001/0001.nix +++ b/hosts/0001/0001.nix @@ -17,6 +17,7 @@ in { ./caddy.nix ./keycloak.nix + ./nextcloud.nix ./gitea.nix ./mailman.nix diff --git a/hosts/0001/drone.nix b/hosts/0001/drone.nix deleted file mode 100644 index 8b7dd693..00000000 --- a/hosts/0001/drone.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ - config, - lib, - pkgs, - self, - ... -}: { - age.secrets.drone-secrets = { - file = "${self}/secrets/drone-secrets.age"; - mode = "600"; - owner = "drone"; - }; - age.secrets.drone-db-secrets = { - file = "${self}/secrets/drone-db-secrets.age"; - mode = "600"; - owner = "drone"; - }; - - users.users.drone = { - description = "Drone Service"; - home = "/var/lib/drone"; - useDefaultShell = true; - uid = 994; - group = "drone"; - isSystemUser = true; - }; - - users.groups.drone = {}; - - systemd.tmpfiles.rules = [ - "d '/var/lib/drone-db' 0750 drone drone - -" - ]; - - system.activationScripts.mkDroneNet = let - docker = config.virtualisation.oci-containers.backend; - dockerBin = "${pkgs.${docker}}/bin/${docker}"; - in '' - ${dockerBin} network inspect drone-net >/dev/null 2>&1 || ${dockerBin} network create drone-net --subnet 172.20.0.0/24 - ''; - - virtualisation = { - docker = { - enable = true; # sadly podman is not supported rightnow - extraOptions = '' - --data-root /data/docker - ''; - }; - - oci-containers = { - backend = "docker"; - containers."drone-db" = { - image = "postgres:14"; - autoStart = true; - user = "994"; - volumes = [ - "/var/lib/drone-db:/var/lib/postgresql/data" - ]; - extraOptions = [ - "--network=drone-net" - ]; - environmentFiles = [ - config.age.secrets.drone-db-secrets.path - ]; - }; - containers."drone-server" = { - image = "drone/drone:2"; - autoStart = true; - user = "994"; - ports = [ - "4000:80" - ]; - dependsOn = ["drone-db"]; - extraOptions = [ - "--network=drone-net" - ]; - environment = { - DRONE_GITEA_SERVER = "https://git.pub.solar"; - DRONE_SERVER_HOST = "ci.pub.solar"; - DRONE_SERVER_PROTO = "https"; - DRONE_DATABASE_DRIVER = "postgres"; - }; - environmentFiles = [ - config.age.secrets.drone-secrets.path - ]; - }; - containers."drone-docker-runner" = { - image = "drone/drone-runner-docker:1"; - autoStart = true; - # needs to run as root - #user = "994"; - volumes = [ - "/var/run/docker.sock:/var/run/docker.sock" - ]; - dependsOn = ["drone-db"]; - extraOptions = [ - "--network=drone-net" - ]; - environment = { - DRONE_RPC_HOST = "ci.pub.solar"; - DRONE_RPC_PROTO = "https"; - DRONE_RUNNER_CAPACITY = "2"; - DRONE_RUNNER_NAME = "flora-6-docker-runner"; - }; - environmentFiles = [ - config.age.secrets.drone-secrets.path - ]; - }; - }; - }; -} diff --git a/users/barkeeper/default.nix b/users/barkeeper/default.nix index 394d3f1b..d2432224 100644 --- a/users/barkeeper/default.nix +++ b/users/barkeeper/default.nix @@ -8,22 +8,20 @@ psCfg = config.pub-solar; in { config = { - home-manager.users = {inherit (hmUsers) barkeeper;}; + home-manager.users = {inherit (hmUsers) momo;}; pub-solar = { # These are your personal settings # The only required settings are `name` and `password`, # The rest is used for programs like git user = { - name = "barkeeper"; - description = "pub.solar infra user"; + name = "momo"; + description = "momo.koeln infra user"; password = "$6$MCJ28kLwfNl9SNDq$Oh9eT6Sn6z4xGrQsLlIBI7cvJzX3P5As59OSZ.hoeBWc79Un2YdwH/hRIC.4ZDOuwQp0lHI82dNn/xeTaCn631"; - fullName = "pub.solar infra barkeeper"; - email = "admins@pub.solar"; + fullName = "momo infra user"; + email = "admins@momo.koeln"; gpgKeyId = ""; publicKeys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmiF8ndGhnx2YAWbPDq14fftAwcJ0xnjJIVTotI12OO4SPX/SwH5Yp8C8Kf002qN9FbFmaONzq3s8TYpej13JubhfsQywNuFKZuZvJeHzmOwxsANW86RVrWT0WZmYx9a/a1TF9rPQpibDVt60wX8yLdExaJc5F1SvIIuyz1kxYpz36wItfR6hcwoLGh1emFCmfCpebJmp3hsrMDTTtTW/YNhyeSZW74ckyvZyjCYtRCJ8uF0ZmOSKRdillv4Ztg8MsUubGn+vaMl6V6x/QuDuehEPoM/3wBx9o22nf+QVbk7S1PC8EdT/K5vskn4/pfR7mDCyQOq1hB4w4Oyn0dsfX pi@ssrtc" - "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHx4A8rLYmFgTOp1fDGbbONN8SOT0l5wWrUSYFUcVzMPTyfdT23ZVIdVD5yZCySgi/7PSh5mVmyLIZVIXlNrZJg= @b12f Yubi Main" "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEST9eyAY3nzGYNnqDYfWHu+89LZsOjyKHMqCFvtP7vrgB7F7JbbECjdjAXEOfPDSCVwtMMpq8JJXeRMjpsD0rw= @b12f Yubi Backup" @@ -33,7 +31,6 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAqkqMYgncrnczcW/0PY+Z+FmNXXpgw6D9JWTTwiainy hensoko@hensoko-tp-work" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbaQdxp7Flz6ttELe63rn+Nt9g43qJOLih6VCMP4gPb @hensoko" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIKa5elEXgBc2luVBOHVWZisJgt0epFQOercPi0tZzPU root@cloud.pub.solar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMNeQYLFauAbzDyIbKC86NUh9yZfiyBm/BtIdkcpZnSU axeman@tuxnix" ]; };