]> gitweb.ps.run Git - flake_server/commitdiff
update config
authorPatrick <patrick.schoenberger@posteo.de>
Mon, 14 Apr 2025 13:32:59 +0000 (15:32 +0200)
committerPatrick <patrick.schoenberger@posteo.de>
Mon, 14 Apr 2025 13:32:59 +0000 (15:32 +0200)
configuration.nix
flake.nix

index 5017789b02e330b3d58f254ff9ac3d86aea14bc2..b2563ba930b56762eac2e6bce9c50d06ebc0967b 100644 (file)
   nix.settings.experimental-features = [ "nix-command" "flakes" ];
   nix.package = pkgs.nixVersions.nix_2_28;
 
+  nix.gc = {
+    automatic = true;
+    options = "--delete-older-than 30d";
+  };
+  nix.optimise.automatic = true;
+  system.autoUpgrade = {
+    enable = true;
+    allowReboot = true;
+  };
+
   networking.hostName = "nixos"; # Define your hostname.
   # Pick only one of the below networking options.
   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
   # List packages installed in system profile. To search, run:
   # $ nix search wget
   environment.systemPackages = with pkgs; [
-    vim neovim wget file git
-    zig fzf bat
+    vim wget file git fzf bat
+    helix
+    gitui
     bintools
-    htop
+    btop htop
+    systemctl-tui
     tmux
 
-    forgejo
-    mbedtls
     pkg-config
   ];
 
     group = "git";
     home = "/srv/git";
     createHome = true;
+    homeMode = "750";
     shell = "${pkgs.git}/bin/git-shell";
     openssh.authorizedKeys.keys = [
       "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQOPefMnq0qvFjYxlrdlSmUgyCbvV85gkfRykVlTnrn ps@nixos"
       }
     '';
     virtualHosts."git.psch.dev".extraConfig = ''
+      redir / /cgit
+      reverse_proxy localhost:8082
     '';
   };
 
     port = 9418;
   };
 
+  services.lighttpd = {
+    enable = true;
+    document-root = "/srv/www";
+    port = 8082;
+
+    cgit = {
+      enable = true;
+      subdir = "cgit";
+      configText = ''
+        scan-path=/srv/git
+        robots=noindex, nofollow
+      '';
+    };
+    gitweb.enable = true;
+  };
+  users.users."lighttpd".extraGroups = [ "git" ];
+
+  services.gitweb = {
+    gitwebTheme = false;
+    projectroot = "/srv/git";
+  };
+
   # Open ports in the firewall.
   # networking.firewall.allowedTCPPorts = [ ... ];
   # networking.firewall.allowedUDPPorts = [ ... ];
index 7ae4716a1459b7c099ac23ccfb2e35b23843a451..6a384df22e091ea2e7d044f2b40794635629d17d 100644 (file)
--- a/flake.nix
+++ b/flake.nix
@@ -8,14 +8,14 @@
     chirp.url = "git://psch.dev/chirp";
   };
 
-  outputs = { self, nixpkgs, flake-utils, chirp, ... }@inputs: {
+  outputs = { self, nixpkgs, flake-utils, ... }@inputs: {
     nixosConfigurations = {
       default = nixpkgs.lib.nixosSystem {
         system = "x86_64-linux";
         modules = [
           ./configuration.nix
           {
-            config._module.args.chirp = chirp;
+            config._module.args.chirp = inputs.chirp;
           }
         ];
       };