userdir, zsh fixes
This commit is contained in:
parent
7043532749
commit
e739a60e66
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
domain = "users.${config.networking.domain}";
|
||||
port = 8083;
|
||||
|
@ -18,18 +18,19 @@ in
|
|||
|
||||
mkdir -p $HOME/public_html
|
||||
# public_html dir: apache and $USER have rwx on everything inside
|
||||
setfacl -m u:${apacheUser}:rwx,d:u:${apacheUser}:rwx,d:u:$USER:rwx $HOME/public_html
|
||||
setfacl -m u:${apacheUser}:rwx,d:u:${apacheUser}:rwx,d:u:''${USER}:rwx $HOME/public_html
|
||||
fi
|
||||
'';
|
||||
|
||||
services.httpd = {
|
||||
enable = true;
|
||||
enablePHP = true;
|
||||
extraModules = [ "userdir" ];
|
||||
|
||||
virtualHosts.${domain} = {
|
||||
enableUserDir = true;
|
||||
extraConfig = ''
|
||||
UserDir /home/users/*/public_html
|
||||
UserDir disabled root
|
||||
UserDir /home/users/*/public_html/
|
||||
<Directory "/home/users/*/public_html">
|
||||
Options -Indexes +MultiViews +SymLinksIfOwnerMatch +IncludesNoExec
|
||||
DirectoryIndex index.php index.html
|
||||
|
@ -55,6 +56,10 @@ in
|
|||
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
extraConfig = ''
|
||||
proxy_intercept_errors on;
|
||||
error_page 403 404 =404 /404.html;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
programs.command-not-found.enable = false;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
|
@ -12,19 +12,14 @@
|
|||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
l = "ls -l";
|
||||
ll = "ls -la";
|
||||
la = "ls -a";
|
||||
less = "bat";
|
||||
};
|
||||
histSize = 100000;
|
||||
histFile = "~/.local/share/zsh/history";
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
highlightStyle = "fg=#00bbbb,bold";
|
||||
};
|
||||
|
||||
# don't override agdsn-zsh-config aliases
|
||||
shellAliases = lib.mkForce {};
|
||||
|
||||
shellInit = ''
|
||||
zsh-newuser-install () {}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue