diff options
| author | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-08 22:14:13 -0400 | 
|---|---|---|
| committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-10-08 22:14:13 -0400 | 
| commit | ae750d5cc7f39a69728051ff577fd0a5abb41049 (patch) | |
| tree | 2cc0e73b82a867d25417d137e23c726a16ee42db /modules | |
| parent | 50f83e589ba6de2e17d42ae8f729a62344ee89a9 (diff) | |
add git vm
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/git/cgit.nix | 41 | ||||
| -rw-r--r-- | modules/git/compromyse.nix | 10 | 
2 files changed, 51 insertions, 0 deletions
| diff --git a/modules/git/cgit.nix b/modules/git/cgit.nix new file mode 100644 index 0000000..d7d172b --- /dev/null +++ b/modules/git/cgit.nix @@ -0,0 +1,41 @@ +{ config, ... }: + +let +  repositoryPath = "/home/compromyse"; +in { +  services.cgit = { +    enable = true; +    scanPath = repositoryPath; +    settings = { +      root-title = "compromyse: CGIT"; +      root-desc = "Compromyse's Git Repositories"; +      clone-url = "https://git.compromyse.xyz/$CGIT_REPO_URL"; +      enable-commit-graph = 1; +      enable-log-filecount = 1; +      enable-log-linecount = 1; +    }; +  }; + +  services.fcgiwrap.enable = true; + +  services.nginx = { +    enable = true; +    virtualHosts."git.compromyse.com" = { +      forceSSL = true; +      enableACME = true; +      root = "${pkgs.cgit}/cgit"; +      locations."/" = { +        extraConfig = '' +          include ${pkgs.cgit}/cgit/cgit.conf; +          fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; +          fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi; +          fastcgi_param PATH_INFO $uri; +          include ${pkgs.nginx}/conf/fastcgi_params; +        ''; +      }; +    }; +  }; + +  security.acme.acceptTerms = true; +  security.acme.defaults.email = "raghus2247@gmail.com"; +} diff --git a/modules/git/compromyse.nix b/modules/git/compromyse.nix new file mode 100644 index 0000000..509d57f --- /dev/null +++ b/modules/git/compromyse.nix @@ -0,0 +1,10 @@ +{ config, ... }: + +{ +  users.users.compromyse = { +    initialPassword = "testing"; +    isNormalUser = true; +    openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDljZ44cNtYqvpeGuUsMRekkjiyaCLraX7GHp2BJGyhvUnCpVz7I5K6SGQ92vnEdkbQpUEs29Cw5RTYTKDXcn1zyl7fi/jLWVLgV3Apc7dbJvhQOTfxB24D5EuOR+3nZFtR1C89VNiB55ahqoBAxGMxr9GkOaKplruT1u+UOAW7wRwCGWoC7ySuVRnEoquWsv3ZHZhxTgmM6b8wnOk9K/to0JY51fbZ56OXcUKRUNkq4QzVMWEhWEpOuSFeufOewCjUIcMQkWzjG3XiqF7gBGnNqbvPlWOB3iLbAdOGBfkAxFlzTBGzwNEGWV39AMWHA1dRBKeETo5sHACsorpIQ3IHR3uHz3YccqhzOBqERqU419ioLdHSQt7uXS54AvZ7ZAMm/RZBeFdupT2dhfOdmvY/2ZHHEuP55A3GExlthaFR+SPKc1q/MhtX/+hBhtkPH+RMP/WPgPbXBCLVdL/ul/vGk8CGCFeKAVrexmz5q+5xax/gDIKfS3ynoMCrWxoto2U= raghus2247@gmail.com" ]; +  }; +  security.sudo.wheelNeedsPassword = false; +} | 
