summaryrefslogtreecommitdiff
path: root/hosts/antares/configuration.nix
diff options
context:
space:
mode:
authorDominik Kaiser2025-02-16 22:21:31 +0100
committerDominik Kaiser2025-02-16 22:21:31 +0100
commit679e6dd2d7d3c64cf1c33be9565423a29a5acdc8 (patch)
treeed00bc96749fc4e81d886a423f7d82740f83922c /hosts/antares/configuration.nix
parent733d760b7feafcf60a382b3390eaa1d723fb3d55 (diff)
downloadnixos-679e6dd2d7d3c64cf1c33be9565423a29a5acdc8.tar.gz
nixos-679e6dd2d7d3c64cf1c33be9565423a29a5acdc8.zip
Setup git-server on antares
Diffstat (limited to 'hosts/antares/configuration.nix')
-rw-r--r--hosts/antares/configuration.nix33
1 files changed, 24 insertions, 9 deletions
diff --git a/hosts/antares/configuration.nix b/hosts/antares/configuration.nix
index 494af51..5151125 100644
--- a/hosts/antares/configuration.nix
+++ b/hosts/antares/configuration.nix
@@ -22,6 +22,14 @@
PasswordAuthentication = false;
PermitRootLogin = "no";
};
+ extraConfig = ''
+ Match user git
+ AllowTcpForwarding no
+ AllowAgentForwarding no
+ PasswordAuthentication no
+ PermitTTY no
+ X11Forwarding no
+ '';
};
networking.hostName = "antares";
@@ -43,7 +51,13 @@
};
services.gitweb = {
- projectroot = "/home/git";
+ projectroot = "/srv/git";
+ gitwebTheme = true;
+ extraConfig = ''
+ our $site_name = 'git.dkaiser.de';
+ $omit_owner = true;
+ $projects_list_description_width = 25;
+ '';
};
services.nginx = {
@@ -51,17 +65,13 @@
gitweb = {
enable = true;
- virtualHost = "dkaiser.de";
+ location = "";
+ virtualHost = "git.dkaiser.de";
};
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
-
- virtualHosts = "dkaiser.de" = {
- forceSSL = true;
- enableACME = true;
- };
};
environment.systemPackages = map lib.lowPrio [
@@ -79,13 +89,18 @@
];
};
users.users.git = {
- isNormalUser = true;
+ isSystemUser = true;
description = "git";
- extraGroups = [ ];
+ group = "git";
+ home = "/srv/git";
+ createHome = true;
+ shell = "${pkgs.git}/bin/git-shell";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtL2eG098LhkFPR4N5e44XMq60uvCUCOuKMYs5zjg6f"
];
};
+ users.groups.git = {};
+
system.stateVersion = "24.05";
}