X-Git-Url: https://gitweb.ps.run/flake_server/blobdiff_plain/eacd07da1b91fc1dc317b6da7fe8d22179e20d89..fff3d136b792e85de28b9a3aa4a4686d18092e90:/configuration.nix diff --git a/configuration.nix b/configuration.nix index 5017789..8227bbb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -21,7 +21,17 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.package = pkgs.nixVersions.nix_2_28; - networking.hostName = "nixos"; # Define your hostname. + nix.gc = { + automatic = true; + options = "--delete-older-than 30d"; + }; + nix.optimise.automatic = true; + system.autoUpgrade = { + enable = true; + allowReboot = true; + }; + + networking.hostName = "pschdev"; # Define your hostname. # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. @@ -85,14 +95,15 @@ # 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 + md4c - forgejo - mbedtls pkg-config ]; @@ -102,6 +113,7 @@ group = "git"; home = "/srv/git"; createHome = true; + homeMode = "750"; shell = "${pkgs.git}/bin/git-shell"; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICQOPefMnq0qvFjYxlrdlSmUgyCbvV85gkfRykVlTnrn ps@nixos" @@ -142,6 +154,7 @@ }; services.qemuGuest.enable = true; # virtualisation.qemu.guestAgent.enable = true; + programs.mosh.enable = true; services.caddy = { enable = true; @@ -157,6 +170,8 @@ } ''; virtualHosts."git.psch.dev".extraConfig = '' + redir / /cgit + reverse_proxy localhost:8082 ''; }; @@ -193,6 +208,32 @@ 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 + readme=:readme.md + about-filter=${pkgs.writeShellScript "markdown" '' + ${pkgs.md4c}/bin/md2html --github --ftables + ''} + ''; + }; + 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 = [ ... ];