From b5eea3d798b7faf45d74b7703cf97a981b2f7055 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Thu, 27 Mar 2025 09:26:52 -0700 Subject: [PATCH 1/3] Forgejo, use sshd port internally, disable https --- nixosModules/services/forgejo/service.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixosModules/services/forgejo/service.nix b/nixosModules/services/forgejo/service.nix index 2a1b2c2..e27e24d 100644 --- a/nixosModules/services/forgejo/service.nix +++ b/nixosModules/services/forgejo/service.nix @@ -24,10 +24,11 @@ DOMAIN = config.forgejo.server.domain; #"winry.woach.me"; HTTP_PORT = config.forgejo.server.port; ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}/"; + SSH_PORT = config.sshd.port; }; - # SSH_PORT = config.sshd.port; session.COOKIE_SECURE = true; service.DISABLE_REGISTRATION = true; + repository.DISABLE_HTTP_GIT = true; }; }; From 8cd1945b3bd344febad2da4f28b15c04a31b3c50 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Wed, 9 Apr 2025 14:06:04 -0700 Subject: [PATCH 2/3] Postgres, service init --- hosts/juri/host.nix | 2 ++ nixosModules/services/postgresql/service.nix | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 nixosModules/services/postgresql/service.nix diff --git a/hosts/juri/host.nix b/hosts/juri/host.nix index 4d32aa2..8a016b6 100644 --- a/hosts/juri/host.nix +++ b/hosts/juri/host.nix @@ -56,6 +56,8 @@ in { }; }; + postgres.enable = true; + shell.enabledShells = [ "fish" ]; shell.defaultShell = "fish"; diff --git a/nixosModules/services/postgresql/service.nix b/nixosModules/services/postgresql/service.nix new file mode 100644 index 0000000..fe6eaa3 --- /dev/null +++ b/nixosModules/services/postgresql/service.nix @@ -0,0 +1,18 @@ +{ config, lib, pkgs, ... }: + +{ + options.postgres = { + enable = lib.mkEnableOption ""; + }; + + config = lib.mkIf config.postgres.enable { + services.postgresql = { + enable = true; + package = pkgs.postgresql_17; + authentication = '' + #type database DBuser auth-method + local all all trust + ''; + }; + }; +} From 90f412816424edf5e5ee3aec8aca518eb76a0c2d Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Wed, 16 Apr 2025 11:52:16 -0700 Subject: [PATCH 3/3] Fish, fix pull/push prompt and change characters The prompt has been broken for a while now on pull/push, this is because it was using unicode characters that were larger in the terminal, causing wraps that would reprint lines. I changed the characters for push/pull because of it. I also removed the stash character, and changed the dirty and staged characters to match the new characters --- hmModules/apps/fish/functions/git_prompt.fish | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hmModules/apps/fish/functions/git_prompt.fish b/hmModules/apps/fish/functions/git_prompt.fish index a0bb65b..b02ecc6 100644 --- a/hmModules/apps/fish/functions/git_prompt.fish +++ b/hmModules/apps/fish/functions/git_prompt.fish @@ -43,22 +43,22 @@ if git_is_repo if test (command git ls-files --others --exclude-standard | wc -w 2> /dev/null) -gt 0 set git_meta "$git_meta?" end - if test (command git rev-list --walk-reflogs --count refs/stash 2> /dev/null) - set git_meta "$git_meta\$" - end + # if test (command git rev-list --walk-reflogs --count refs/stash 2> /dev/null) + # set git_meta "$git_meta\$" + # end if git_is_touched - git_is_dirty && set git_meta "$git_meta⨯" - git_is_staged && set git_meta "$git_meta●" + git_is_dirty && set git_meta (string join "$git_meta" "x") + git_is_staged && set git_meta (string join "$git_meta" "o") end set -l commit_count (command git rev-list --count --left-right (git remote)/(git_branch_name)"...HEAD" 2> /dev/null) if test $commit_count set -l behind (echo $commit_count | cut -f 1) set -l ahead (echo $commit_count | cut -f 2) if test $behind -gt 0 - set git_meta "$git_meta🠋" + set git_meta "$git_meta«" end if test $ahead -gt 0 - set git_meta "$git_meta🠉" + set git_meta "$git_meta»" end end if test $git_meta