summaryrefslogtreecommitdiff
path: root/machines/xnet/gitserver/default.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2025-04-02 21:59:20 -0400
committerKleidi Bujari <mail@4kb.net>2025-04-02 21:59:20 -0400
commit09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52 (patch)
treebd8f1d3a51f12cd98764ae572b00f0b32de62644 /machines/xnet/gitserver/default.nix
parentb1738c105de3bc0ba7cd27f68c9eb146439a0964 (diff)
downloaddepot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.tar.gz
depot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.tar.bz2
depot-09c2b6de63a6ff35348fcb2c2eb57b974f0a8a52.zip
automate project structure
Diffstat (limited to 'machines/xnet/gitserver/default.nix')
-rw-r--r--machines/xnet/gitserver/default.nix49
1 files changed, 0 insertions, 49 deletions
diff --git a/machines/xnet/gitserver/default.nix b/machines/xnet/gitserver/default.nix
deleted file mode 100644
index 2152ebd..0000000
--- a/machines/xnet/gitserver/default.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{ config, lib, pkgs, ... }:
-let
- cfg = config.xnet.gitServer;
- inherit (lib) mkOption mkIf types;
-in
-{
- imports = [ ./gitweb.nix ];
-
- options.xnet.gitServer = {
- enable = mkOption {
- type = types.bool;
- default = false;
- description = "Serve git repos over SSH.";
- };
-
- path = mkOption {
- type = types.path;
- default = "/persist/repo/git";
- description = "Directory where repos will be stored.";
- };
- };
-
- config = mkIf cfg.enable {
- users.users.git = {
- group = "git";
- initialPassword = "";
- isSystemUser = true;
- home = cfg.path;
- homeMode = "755";
- createHome = true;
- shell = "${pkgs.git}/bin/git-shell";
- openssh.authorizedKeys.keys = config.xnet.pubKeys;
- };
-
- users.groups.git = { };
-
- programs.git = {
- enable = true;
- config = {
- init = {
- defaultBranch = "master";
- };
- safe = {
- directory = "*";
- };
- };
- };
- };
-}