From 1beac52c9890ce7b5ab28f051dcf04625aad2011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madeleine=20Sydney=20=C5=9Alaga?= Date: Sat, 31 Jan 2026 16:23:04 -0700 Subject: [PATCH] feat(gitea): init --- hosts/deertopia/configuration.nix | 1 + modules/home/users/msyds/emacs/bookmarks | 11 ++++ modules/home/users/msyds/emacs/init.el | 43 ++++++++++++++ .../users/msyds/emacs/transient/history.el | 1 + modules/nixos/deertopia/gitea.nix | 59 +++++++++++++++++++ 5 files changed, 115 insertions(+) create mode 100644 modules/home/users/msyds/emacs/bookmarks create mode 100644 modules/home/users/msyds/emacs/transient/history.el create mode 100644 modules/nixos/deertopia/gitea.nix diff --git a/hosts/deertopia/configuration.nix b/hosts/deertopia/configuration.nix index f748d04..a65204f 100644 --- a/hosts/deertopia/configuration.nix +++ b/hosts/deertopia/configuration.nix @@ -49,6 +49,7 @@ deertopia = { authelia.enable = true; + gitea.enable = true; quiver.enable = true; www.enable = true; bepasty.enable = true; diff --git a/modules/home/users/msyds/emacs/bookmarks b/modules/home/users/msyds/emacs/bookmarks new file mode 100644 index 0000000..9686ab3 --- /dev/null +++ b/modules/home/users/msyds/emacs/bookmarks @@ -0,0 +1,11 @@ +;;;; Emacs Bookmark Format Version 1;;;; -*- coding: utf-8-emacs; mode: lisp-data -*- +;;; This format is meant to be slightly human-readable; +;;; nevertheless, you probably don't want to edit it. +;;; -*- End Of Bookmark File Format Version Stamp -*- +(("org-capture-last-stored" + (filename . "~/org/20260207174607-discontinuity_linguistics.org") + (front-context-string . "\nIn [[id:f140be8") + (rear-context-string . "y (linguistics)\n") + (position . 105) + (last-modified 27015 56580 955383 229000)) +) diff --git a/modules/home/users/msyds/emacs/init.el b/modules/home/users/msyds/emacs/init.el index 0292b91..df76207 100755 --- a/modules/home/users/msyds/emacs/init.el +++ b/modules/home/users/msyds/emacs/init.el @@ -63,3 +63,46 @@ syd/eshell syd/treesit syd/grammatical-framework)) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(org-latex-preview-mode-display-live t nil nil "Customized with use-package org-latex-preview") + '(org-latex-preview-mode-update-delay 0.25 nil nil "Customized with use-package org-latex-preview") + '(safe-local-variable-directories + '("/home/msyds/src/deertopia.net/" + "/home/msyds/src/net-deertopia/publisher/" + "/home/msyds/src/net-deertopia/")) + '(safe-local-variable-values '((jinx-languages . "en_GB en_US")))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(comint-highlight-prompt ((t :foreground "#C8C093" :background unspecified :weight bold))) + '(form-feed-st-line ((t :strike-through "#727169"))) + '(org-block ((t (:inherit fixed-pitch :background "#1a1a22")))) + '(org-block-begin-line ((t (:foreground unspecified :inherit font-lock-comment-face :extend t :background "#16161D" :height 0.75)))) + '(org-block-end-line ((t (:foreground unspecified :inherit font-lock-comment-face :extend t :background "#16161D" :height 0.75)))) + '(org-checkbox ((t (:inherit fixed-pitch)))) + '(org-code ((t (:inherit (shadow fixed-pitch))))) + '(org-document-info ((t (:weight bold :height 1.0)))) + '(org-document-info-keyword ((t (:background unspecified :foreground unspecified :inherit (fixed-pitch font-lock-comment-face) :height 0.9)))) + '(org-document-title ((t (:weight bold :height 1.6)))) + '(org-drawer ((t (:foreground unspecified :inherit font-lock-comment-face :extend t :background "#16161D" :height 0.75)))) + '(org-ellipsis ((t (:height 1.0)))) + '(org-indent ((t (:inherit (org-hide syd-alt-fixed-pitch))))) + '(org-level-1 ((t (:weight bold :height 1.4 :foreground "#957FB8")))) + '(org-level-2 ((t (:weight bold :height 1.35 :foreground "#7E9CD8")))) + '(org-level-3 ((t (:weight bold :height 1.3 :foreground "#9CABCA")))) + '(org-level-4 ((t (:weight bold :height 1.25 :foreground "#A3D4D5")))) + '(org-level-5 ((t (:weight bold :height 1.2 :foreground "#7AA89F")))) + '(org-level-6 ((t (:weight bold :height 1.15 :foreground "#98BB6C")))) + '(org-level-7 ((t (:weight bold :height 1.1 :foreground "#938056")))) + '(org-level-8 ((t (:weight bold :height 1.05 :foreground "#C0A36E")))) + '(org-meta-line ((t (:background unspecified :foreground unspecified :inherit (fixed-pitch font-lock-comment-face) :height 0.9)))) + '(org-property-value ((t (:inherit fixed-pitch)))) + '(org-quote ((t (:inherit (variable-pitch org-block))))) + '(org-special-keyword ((t (:inherit (font-lock-comment-face fixed-pitch))))) + '(org-table ((t (:inherit fixed-pitch))))) diff --git a/modules/home/users/msyds/emacs/transient/history.el b/modules/home/users/msyds/emacs/transient/history.el new file mode 100644 index 0000000..90b5a84 --- /dev/null +++ b/modules/home/users/msyds/emacs/transient/history.el @@ -0,0 +1 @@ +nil \ No newline at end of file diff --git a/modules/nixos/deertopia/gitea.nix b/modules/nixos/deertopia/gitea.nix new file mode 100644 index 0000000..738f752 --- /dev/null +++ b/modules/nixos/deertopia/gitea.nix @@ -0,0 +1,59 @@ +{ config, lib, pkgs, ... }: + +let cfg = config.sydnix.deertopia.gitea; +in { + options.sydnix.deertopia.gitea = { + enable = lib.mkEnableOption "Gitea"; + }; + + config = lib.mkIf cfg.enable { + sydnix.impermanence.directories = [ + { + directory = config.services.gitea.stateDir; + inherit (config.services.gitea) user group; + } + ]; + + sydnix.deertopia.nginx.vhosts."git" = { + directory = null; + vhost = { + forceSSL = true; + enableACME = true; + locations."/".extraConfig = + let port = builtins.toString config.services.gitea + .settings.server.HTTP_PORT; + in '' + proxy_pass http://127.0.0.1:${port}/; + ''; + }; + }; + + users.users.git = { + description = "Gitea Service"; + home = config.services.gitea.stateDir; + useDefaultShell = true; + group = config.services.gitea.group; + isSystemUser = true; + }; + + users.groups.git = { }; + + # sudo -u git gitea admin auth add-ldap --name gitea --port 3890 --bind-dn 'uid=gitea,ou=people,dc=deertopia,dc=net' --bind-password «password» --user-search-base 'ou=people,dc=deertopia,dc=net' --user-filter '(&(memberof=cn=git,ou=groups,dc=deertopia,dc=net)(|(uid=%[1]s)(mail=%[1]s)))' --username-attribute uid --firstname-attribute givenName --surname-attribute sn --email-attribute mail --avatar-attribute jpegPhoto --security-protocol unencrypted --host 127.0.0.1 --config /var/lib/gitea/custom/conf/app.ini --synchronize-users + + services.gitea = { + enable = true; + user = "git"; + group = "git"; + settings = { + server = { + ROOT_URL = "https://git.deertopia.net/"; + HTTP_PORT = 3000; + DOMAIN = "deertopia.net"; + }; + service = { + DISABLE_REGISTRATION = true; + }; + }; + }; + }; +}