summaryrefslogtreecommitdiff
path: root/configuration/snorlax/git.nix
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-02-12 08:19:04 +0100
committerJasper Ras <jras@hostnet.nl>2025-02-12 08:19:04 +0100
commit07f84bb581e369ff79100f0417e9d277f3c1fb61 (patch)
tree64ec899f185a3d794791df191f53939dbc67be41 /configuration/snorlax/git.nix
parent8fe481c0858702231335ad6c5eb850b293781b61 (diff)
alot of stuff
Diffstat (limited to 'configuration/snorlax/git.nix')
-rw-r--r--configuration/snorlax/git.nix71
1 files changed, 0 insertions, 71 deletions
diff --git a/configuration/snorlax/git.nix b/configuration/snorlax/git.nix
deleted file mode 100644
index a24c26a..0000000
--- a/configuration/snorlax/git.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{ lib, pkgs, ... }:
-let
- home = "/var/lib/git";
- repos = {
- nixos = {
- path = "${home}/nixos.git";
- desc = "My NixOS Configurations";
- owner = "jras";
- };
-
- notes = {
- path = "${home}/notes.git";
- desc = "My notes";
- owner = "jras";
- };
-
- obsidian-wavez-theme = {
- path = "${home}/obsidian-wavez-theme.git";
- desc = "The bordeaux theme for Obsidian";
- owner = "jras";
- };
-
- astal-bar = {
- path = "${home}/astal-bar.git";
- desc = "A wayland bar in jsx";
- owner = "jras";
- };
- };
-
- startScript = pkgs.writeShellScript "init-git-repos" ''
- ${lib.concatMapStrings ({ path, ... }: "${pkgs.git}/bin/git init --bare --shared ${path} && cd ${path} && ${pkgs.git}/bin/git branch -m main \n") (builtins.attrValues repos)}
- '';
-in
-{
- networking.firewall.allowedTCPPorts = [ 80 ];
-
- services.cgit.snorlax = {
- enable = true;
- group = "git";
- repos = repos;
- };
-
- systemd.services.init-repos = {
- description = "Initialize git repositories";
- wantedBy = [ "multi-user.target" ];
- restartTriggers = [ startScript ];
-
- serviceConfig = {
- Type = "oneshot";
- User = "git";
- Group = "git";
- ExecStart = startScript;
- };
- };
-
- users.groups.git = {};
- users.users.git = {
- isNormalUser = true;
- home = "${home}";
- homeMode = "0750";
- createHome = true;
- shell = pkgs.zsh;
- group = "git";
- openssh.authorizedKeys.keyFiles = [
- ../../keys/id_tarrel.pub
- ../../keys/id_work.pub
- ];
- packages = with pkgs; [ git ];
- };
- services.openssh.settings.AllowUsers = [ "git" ];
-}