diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-05-14 00:24:32 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2021-05-14 00:24:32 +0200 |
commit | 72aa1adda58f6d7e11b61ad1224c92255b08e818 (patch) | |
tree | 05b2c3fb46b0b9e71c51afe3f03580a99e9006f7 /machines | |
parent | 8b8be63e51fa9fd4feeb26af571649f72677b1bc (diff) | |
download | dots-72aa1adda58f6d7e11b61ad1224c92255b08e818.tar.gz dots-72aa1adda58f6d7e11b61ad1224c92255b08e818.zip |
Add newrepo and autoindex
Diffstat (limited to 'machines')
-rw-r--r-- | machines/srv1/configuration.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/machines/srv1/configuration.nix b/machines/srv1/configuration.nix index 12789c6..1489a6f 100644 --- a/machines/srv1/configuration.nix +++ b/machines/srv1/configuration.nix @@ -18,6 +18,16 @@ let sudo -u git ${pkgs.git}/bin/git clone --mirror $1 $name sudo -u git /run/current-system/sw/bin/chmod -R g+w $name ''; + + newrepo = pkgs.writeScriptBin "newrepo" '' + #!/bin/sh + + [ -z $1 ] && echo "Pass repo name" && exit 1 + + sudo -u git git init --bare /srv/git/$1 + sudo -u git /run/current-system/sw/bin/chmod -R g+w /srv/git/$1 + ''; + in { imports = @@ -96,6 +106,7 @@ in curl wget htop git nvim lm_sensors mirror + newrepo ]; services.openssh.enable = true; @@ -191,6 +202,11 @@ in enableACME = true; forceSSL = true; root = "/var/www/zhr.niedzwiedzinski.cyou"; + extraConfig = '' + location /rozkazy/ { + autoindex on; + } + ''; }; "help.niedzwiedzinski.cyou" = { enableACME = true; |