commit fe84f718fbb77b521fd86963aa47d9e7f24359ab
parent 017c8b6bfc13a7a539df8b73599dd2f4679be86a
Author: Francesco Saccone <francesco@francescosaccone.com>
Date: Thu, 27 Mar 2025 17:29:17 +0100
feat: move git hosting from main-server to git-server
Signed-off-by: Francesco Saccone <francesco@francescosaccone.com>
Diffstat:
3 files changed, 35 insertions(+), 37 deletions(-)
diff --git a/hosts/git-server/default.nix b/hosts/git-server/default.nix
@@ -7,6 +7,8 @@ let
rootDomain = import "${mainServer}/domain.nix";
gitDomain = "git.${rootDomain}";
+
+ scripts = import ./scripts.nix { inherit config pkgs inputs; };
in
{
imports = [
@@ -38,6 +40,39 @@ in
];
};
};
+ git = {
+ enable = true;
+ repositories =
+ {
+ flake = {
+ description = "Francesco Saccone's Nix flake.";
+ };
+ password-store = {
+ description = "Francesco Saccone's password store.";
+ };
+ sbase = {
+ description = "Francesco Saccone's fork of suckless UNIX tools.";
+ };
+ site = {
+ description = "Francesco Saccone's site content.";
+ };
+ }
+ |> builtins.mapAttrs (
+ name:
+ { description }:
+ {
+ additionalFiles = {
+ inherit description;
+ owner = "Francesco Saccone";
+ url = "git://${gitDomain}/${name}";
+ };
+ hooks.postReceive = scripts.stagitPostReceive { inherit name; };
+ }
+ );
+ daemon = {
+ enable = true;
+ };
+ };
openssh.listen = {
enable = true;
port = 22;
diff --git a/hosts/main-server/scripts.nix b/hosts/git-server/scripts.nix
diff --git a/hosts/main-server/default.nix b/hosts/main-server/default.nix
@@ -6,7 +6,6 @@
}:
let
domain = import ./domain.nix;
- scripts = import ./scripts.nix { inherit config pkgs inputs; };
in
rec {
imports = [
@@ -87,7 +86,6 @@ rec {
generateAtom
generateSitemap
generateHtml
- scripts.stagitCreate
];
packages = [
pkgs.coreutils
@@ -100,7 +98,6 @@ rec {
"index.html" = "/var/tmp/site/html/index.html";
"blog" = "/var/tmp/site/html/blog";
"code" = "/var/tmp/site/html/code";
- "git" = "/var/tmp/stagit";
"public" = "${inputs.site}/public";
"favicon.ico" = "${inputs.site}/favicon.ico";
"robots.txt" = "${inputs.site}/robots.txt";
@@ -125,39 +122,6 @@ rec {
];
};
};
- git = {
- enable = true;
- repositories =
- {
- flake = {
- description = "Francesco Saccone's Nix flake.";
- };
- password-store = {
- description = "Francesco Saccone's password store.";
- };
- sbase = {
- description = "Francesco Saccone's fork of suckless UNIX tools.";
- };
- site = {
- description = "Francesco Saccone's site content.";
- };
- }
- |> builtins.mapAttrs (
- name:
- { description }:
- {
- additionalFiles = {
- inherit description;
- owner = "Francesco Saccone";
- url = "git://${domain}/${name}";
- };
- hooks.postReceive = scripts.stagitPostReceive { inherit name; };
- }
- );
- daemon = {
- enable = true;
- };
- };
openssh.listen = {
enable = true;
port = 22;
@@ -165,7 +129,6 @@ rec {
root = [
./ssh/francescosaccone.pub
];
- git = root;
};
};
};