From da7a5bb9352cb3536c83d65542b9e56b2726e5d2 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Sat, 8 Jul 2023 03:15:18 +0200 Subject: [PATCH] add gitea to chungus --- nixos/components/network/tinc/private.nix | 1 + nixos/machines/chungus/configuration.nix | 1 + nixos/machines/chungus/disko-config.nix | 31 ++++++--------- nixos/machines/chungus/gitea.nix | 38 +++++++++++++++++++ nixos/machines/chungus/rbackup.nix | 8 ++-- nixos/machines/cream/packages-development.nix | 9 +++-- nixos/machines/robi/screeps.nix | 2 +- 7 files changed, 61 insertions(+), 29 deletions(-) create mode 100644 nixos/machines/chungus/gitea.nix diff --git a/nixos/components/network/tinc/private.nix b/nixos/components/network/tinc/private.nix index 5a618ae..dd4aa3d 100644 --- a/nixos/components/network/tinc/private.nix +++ b/nixos/components/network/tinc/private.nix @@ -31,6 +31,7 @@ let "tdarr.pepe" = hosts.pepe; "tts.pepe" = hosts.pepe; # chungus + "git.chungus" = hosts.chungus; "flix.chungus" = hosts.chungus; "grafana.chungus" = hosts.chungus; "loki.chungus" = hosts.chungus; diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 13acd9c..6e3b94b 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -45,6 +45,7 @@ #./kiosk.nix ./trilium.nix + ./gitea.nix ./cache.nix ./tts.nix diff --git a/nixos/machines/chungus/disko-config.nix b/nixos/machines/chungus/disko-config.nix index 879b9e8..c8c60e2 100644 --- a/nixos/machines/chungus/disko-config.nix +++ b/nixos/machines/chungus/disko-config.nix @@ -120,18 +120,6 @@ in "com.sun:auto-snapshot:monthly" = true; }; }; - "nextcloud" = { - type = "zfs_fs"; - mountpoint = "/nextcloud"; - options = { - mountpoint = "legacy"; - compression = "lz4"; - "com.sun:auto-snapshot:hourly" = true; - "com.sun:auto-snapshot:daily" = true; - "com.sun:auto-snapshot:weekly" = true; - "com.sun:auto-snapshot:monthly" = true; - }; - }; "legacy" = { type = "zfs_fs"; mountpoint = "/legacy"; @@ -163,6 +151,17 @@ in "com.sun:auto-snapshot:monthly" = true; }; }; + "mirror" = { + type = "zfs_fs"; + mountpoint = "/mirror"; + options = { + mountpoint = "legacy"; + compression = "lz4"; + "com.sun:auto-snapshot:daily" = true; + "com.sun:auto-snapshot:weekly" = true; + "com.sun:auto-snapshot:montly" = true; + }; + }; "services" = { type = "zfs_fs"; mountpoint = "/srv"; @@ -174,14 +173,6 @@ in "com.sun:auto-snapshot:montly" = true; }; }; - "services/gitea" = { - type = "zfs_fs"; - mountpoint = "/srv/gitea"; - options = { - mountpoint = "legacy"; - compression = "lz4"; - }; - }; "container" = { type = "zfs_fs"; mountpoint = "/var/lib/containers/storage"; # needed for podman diff --git a/nixos/machines/chungus/gitea.nix b/nixos/machines/chungus/gitea.nix new file mode 100644 index 0000000..6501bff --- /dev/null +++ b/nixos/machines/chungus/gitea.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: +{ + + services.nginx = { + enable = true; + statusPage = true; + virtualHosts = { + "git.chungus.private" = { + extraConfig = '' + allow ${config.tinc.private.subnet}; + deny all; + ''; + locations."/" = { + proxyPass = "http://localhost:${toString config.services.gogs.httpPort}"; + }; + }; + }; + }; + + services.gitea = { + enable = true; + appName = "git.chungus.private"; + stateDir = "/srv/gitea"; + settings = { + server.ROOT_URL = "http://git.chungus.private/"; + server.DOMAIN = "git.chungus.private"; + service.DISABLE_REGISTRATION = false; + session.COOKIE_SECURE = false; + log.LEVEL = "Warn"; + other = { + SHOW_FOOTER_VERSION = false; + }; + }; + }; + + # backup.dirs = [ "/srv/gitea" ]; + +} diff --git a/nixos/machines/chungus/rbackup.nix b/nixos/machines/chungus/rbackup.nix index 352d637..16e9203 100644 --- a/nixos/machines/chungus/rbackup.nix +++ b/nixos/machines/chungus/rbackup.nix @@ -6,22 +6,22 @@ nextcloud = { sshKeyPath = config.sops.secrets.rsync_private_key.path; src = "root@robi:/var/lib/nextcloud/"; - dst = "/nextcloud"; + dst = "/mirror/nextcloud"; }; taskwarrior = { sshKeyPath = config.sops.secrets.rsync_private_key.path; src = "root@robi:/var/lib/taskserver/"; - dst = "/srv/taskwarrior"; + dst = "/mirror/taskwarrior"; }; gitea = { sshKeyPath = config.sops.secrets.rsync_private_key.path; src = "root@robi:/var/lib/gitea/"; - dst = "/srv/gitea"; + dst = "/mirror/gitea"; }; bitwarden = { sshKeyPath = config.sops.secrets.rsync_private_key.path; src = "root@robi:/var/lib/bitwarden_rs/"; - dst = "/srv/bitwarden_rs"; + dst = "/mirror/bitwarden_rs"; }; torrent = { sshKeyPath = config.sops.secrets.rsync_private_key.path; diff --git a/nixos/machines/cream/packages-development.nix b/nixos/machines/cream/packages-development.nix index 368c045..2a24675 100644 --- a/nixos/machines/cream/packages-development.nix +++ b/nixos/machines/cream/packages-development.nix @@ -10,7 +10,7 @@ targetPkgs = pkgs: (with pkgs; [ black isort - jetbrains.pycharm-professional + unstable.jetbrains.pycharm-professional python311 pipenv zlib # needed for NumPy @@ -23,7 +23,7 @@ fhsDataGrip = pkgs.buildFHSUserEnv { name = "datagrip"; targetPkgs = pkgs: (with pkgs; [ - jetbrains.datagrip + unstable.jetbrains.datagrip ]); runScript = "datagrip"; }; @@ -32,11 +32,12 @@ [ # rust development environment + gcc rustup - jetbrains.clion + unstable.jetbrains.clion # general - jetbrains.idea-ultimate + unstable.jetbrains.idea-ultimate #vscode fhsDataGrip diff --git a/nixos/machines/robi/screeps.nix b/nixos/machines/robi/screeps.nix index 7cff8d0..5f1c303 100644 --- a/nixos/machines/robi/screeps.nix +++ b/nixos/machines/robi/screeps.nix @@ -5,7 +5,7 @@ let #version = "latest"; # version = "142c079"; # 2 years ago. # version = "v1.14.0"; # 2 years ago. - version = "v1.13.2"; # 2 years ago. + version = "v1.13.2"; # 2 years ago. in { virtualisation.oci-containers = {