add cgit
This commit is contained in:
parent
13d35c76b2
commit
195977e871
|
@ -1,6 +1,114 @@
|
||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
let
|
||||||
|
cgitrc = pkgs.writeText "cgitrc" ''
|
||||||
|
css=/static/cgit.css
|
||||||
|
logo=/static/logo.png
|
||||||
|
favicon=/static/favicon.ico
|
||||||
|
root-title=beepboop.systems
|
||||||
|
root-desc=quality git hosting
|
||||||
|
|
||||||
|
readme=:README
|
||||||
|
readme=:readme
|
||||||
|
readme=:readme.txt
|
||||||
|
readme=:README.txt
|
||||||
|
readme=:readme.md
|
||||||
|
readme=:README.md
|
||||||
|
|
||||||
|
remove-suffix=1
|
||||||
|
section-from-path=1
|
||||||
|
|
||||||
|
section-sort=0
|
||||||
|
|
||||||
|
section=meta
|
||||||
|
|
||||||
|
repo.url=about
|
||||||
|
repo.path=/doesnt/exist
|
||||||
|
repo.desc=about this site
|
||||||
|
|
||||||
|
section=other services at beepboop.systems
|
||||||
|
|
||||||
|
repo.url=bitwarden
|
||||||
|
repo.path=/doesnt/exist
|
||||||
|
repo.desc=a simple password manager
|
||||||
|
|
||||||
|
repo.url=radicale
|
||||||
|
repo.path=/doesnt/exist
|
||||||
|
repo.desc=a simple calendar server
|
||||||
|
|
||||||
|
repo.url=roundcube
|
||||||
|
repo.path=/doesnt/exist
|
||||||
|
repo.desc=mail.beepboop.systems webmail
|
||||||
|
|
||||||
|
repo.url=gitea
|
||||||
|
repo.path=/doesnt/exist
|
||||||
|
repo.desc=real git hosting services (until this one is fully operational)
|
||||||
|
|
||||||
|
section=projects
|
||||||
|
|
||||||
|
repo.url=advent
|
||||||
|
repo.path=/var/lib/git/advent
|
||||||
|
repo.desc=advent of code solutions
|
||||||
|
|
||||||
|
repo.url=desmos-computer
|
||||||
|
repo.path=/var/lib/git/desmos-computer
|
||||||
|
repo.desc=a minimal ISA implemented in the Desmos graphing calculator
|
||||||
|
|
||||||
|
repo.url=dot_testing
|
||||||
|
repo.path=/var/lib/git/dot_testing
|
||||||
|
repo.desc=configuration files for NixOS/GNU+Linux boxes
|
||||||
|
|
||||||
|
repo.url=esgd
|
||||||
|
repo.path=/var/lib/git/esgd
|
||||||
|
repo.desc=the exceedingly simple gopher daemon
|
||||||
|
|
||||||
|
repo.url=mail-sync
|
||||||
|
repo.path=/var/lib/git/mail-sync
|
||||||
|
repo.desc=synchronize mail from walled gardens
|
||||||
|
|
||||||
|
repo.url=mastosnake
|
||||||
|
repo.path=/var/lib/git/mastosnake
|
||||||
|
repo.desc=a low quality clone of Twitter Plays Snake
|
||||||
|
|
||||||
|
repo.url=secmsg
|
||||||
|
repo.path=/var/lib/git/secmsg
|
||||||
|
repo.desc=a stupid (in)secure messaging client thing
|
||||||
|
|
||||||
|
repo.url=ultimate
|
||||||
|
repo.path=/var/lib/git/ultimate
|
||||||
|
repo.desc=ultimate tic tac toe solving engine
|
||||||
|
|
||||||
|
repo.url=wordlefish
|
||||||
|
repo.path=/var/lib/git/wordlefish
|
||||||
|
repo.desc=use information theory to solve wordle puzzles
|
||||||
|
|
||||||
|
section=irc robots
|
||||||
|
|
||||||
|
repo.url=botanybot
|
||||||
|
repo.path=/var/lib/git/botanybot
|
||||||
|
repo.desc=water bots on ~.club
|
||||||
|
|
||||||
|
repo.url=coinminer
|
||||||
|
repo.path=/var/lib/git/coinminer
|
||||||
|
repo.desc=mine fake coins on irc
|
||||||
|
|
||||||
|
repo.url=chaosbot
|
||||||
|
repo.path=/var/lib/git/chaosbot
|
||||||
|
repo.desc=robot to protect a user on chaos
|
||||||
|
|
||||||
|
repo.url=modbot
|
||||||
|
repo.path=/var/lib/git/modbot
|
||||||
|
repo.desc=modular irc robot
|
||||||
|
|
||||||
|
repo.url=pychaos
|
||||||
|
repo.path=/var/lib/git/pychaos
|
||||||
|
repo.desc=python chaos bot
|
||||||
|
|
||||||
|
repo.url=universalducks
|
||||||
|
repo.path=/var/lib/git/universalducks
|
||||||
|
repo.desc=cross channel irc ducks
|
||||||
|
'';
|
||||||
|
in {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -25,6 +133,7 @@
|
||||||
dig
|
dig
|
||||||
htop
|
htop
|
||||||
gnumake
|
gnumake
|
||||||
|
neovim
|
||||||
];
|
];
|
||||||
|
|
||||||
system.copySystemConfiguration = true;
|
system.copySystemConfiguration = true;
|
||||||
|
@ -32,22 +141,19 @@
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/vda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
|
||||||
# services.cgit = {
|
# cgit
|
||||||
# "beepboop.systems" = {
|
users = {
|
||||||
# extraConfig = ''
|
groups.git = { };
|
||||||
# root-desc="testing"
|
users.git = {
|
||||||
#
|
createHome = true;
|
||||||
# section=main
|
home = /var/lib/git;
|
||||||
# repo.url=dot_testing
|
isSystemUser = true;
|
||||||
# repo.path=/var/lib/git/dot_testing
|
shell = "${pkgs.git}/bin/git-shell";
|
||||||
# repo.desc=configuration for NixOS/Linux systems
|
group = "git";
|
||||||
# repo.owner=rndusr
|
};
|
||||||
#
|
};
|
||||||
# readme=:README.md
|
|
||||||
# '';
|
services.fcgiwrap = { enable = true; user = "git"; group = "git"; };
|
||||||
# enable = true;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
networking.hostName = "netbox";
|
networking.hostName = "netbox";
|
||||||
|
|
||||||
|
@ -177,12 +283,54 @@
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = "/var/www/beepboop.systems";
|
root = "/var/www/beepboop.systems";
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."webhooks.beepboop.systems" = {
|
locations."~* ^/static/(.+.(ico|css))$" = {
|
||||||
forceSSL = true;
|
extraConfig = ''
|
||||||
enableACME = true;
|
alias ${pkgs.cgit}/cgit/$1;
|
||||||
root = "/var/www/webhooks.beepboop.systems";
|
'';
|
||||||
|
};
|
||||||
|
locations."/static/logo.png" = {
|
||||||
|
extraConfig = ''
|
||||||
|
try_files /icon.png /icon.png;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/about" = {
|
||||||
|
extraConfig = ''
|
||||||
|
try_files /about.html /about.html;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/bitwarden" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://bit.beepboop.systems;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/gitea" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://git.beepboop.systems/rndusr;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/radicale" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://cal.beepboop.systems;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/roundcube" = {
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://mail.beepboop.systems;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
locations."/" = {
|
||||||
|
extraConfig = ''
|
||||||
|
include ${pkgs.nginx}/conf/fastcgi_params;
|
||||||
|
fastcgi_param CGIT_CONFIG ${cgitrc};
|
||||||
|
fastcgi_param SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi;
|
||||||
|
fastcgi_split_path_info ^(/?)(.+)$;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param QUERY_STRING $args;
|
||||||
|
fastcgi_param HTTP_HOST $server_name;
|
||||||
|
fastcgi_pass unix:${config.services.fcgiwrap.socketAddress};
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."git.beepboop.systems" = {
|
services.nginx.virtualHosts."git.beepboop.systems" = {
|
||||||
|
@ -241,19 +389,19 @@
|
||||||
email = "nickforanick@protonmail.com";
|
email = "nickforanick@protonmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.roundcube = {
|
services.roundcube = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# # this is the url of the vhost, not necessarily the same as the fqdn of
|
# this is the url of the vhost, not necessarily the same as the fqdn of
|
||||||
# # the mailserver
|
# the mailserver
|
||||||
# hostName = "cube.beepboop.systems";
|
hostName = "cube.beepboop.systems";
|
||||||
# extraConfig = ''
|
extraConfig = ''
|
||||||
# # starttls needed for authentication, so the fqdn required to match
|
# starttls needed for authentication, so the fqdn required to match
|
||||||
# # the certificate
|
# the certificate
|
||||||
# $config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
||||||
# $config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
# $config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
# '';
|
'';
|
||||||
# };
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."roundcube.beepboop.systems" = {
|
services.nginx.virtualHosts."roundcube.beepboop.systems" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
|
@ -210,11 +210,11 @@
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1,
|
"lastModified": 1,
|
||||||
"narHash": "sha256-wGl3ZnqjhpAEpTkzgjWxgsbmGX9c7TPCM4I0okuOYFE=",
|
"narHash": "sha256-wGl3ZnqjhpAEpTkzgjWxgsbmGX9c7TPCM4I0okuOYFE=",
|
||||||
"path": "/nix/store/z62lv62z8yn2vfgxk06aqdr7i6wmk2v0-source/builds",
|
"path": "/nix/store/2fjha7mwjnlsmd4s3y7a3lfk3lq3w87z-source/builds",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"path": "/nix/store/z62lv62z8yn2vfgxk06aqdr7i6wmk2v0-source/builds",
|
"path": "/nix/store/2fjha7mwjnlsmd4s3y7a3lfk3lq3w87z-source/builds",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue