rpi3-configurations/global/software-configuration.nix

122 lines
2.4 KiB
Nix
Raw Normal View History

2023-07-18 13:52:59 +00:00
{ pkgs, ... }:
let
downloadDir = "/mnt/Downloads";
in
{
# Enable automatic login for the user.
services = {
# sudo tailscale up --operator=$USER
# use https://hs.wetofu.me
tailscale.enable = true;
logrotate.checkConfig = false;
openssh = {
enable = true;
banner = "Must back to QingDao! Must back HOME!";
settings = {
2023-07-18 14:14:44 +00:00
PermitRootLogin = "no";
2023-07-18 13:52:59 +00:00
PasswordAuthentication = false;
};
};
ntp = {
enable = true;
servers = [
"ntp.ntsc.ac.cn" # China
];
};
transmission = {
enable = false;
openPeerPorts = true;
downloadDirPermissions = "777";
settings = {
download-dir = downloadDir;
peer-port-random-low = "42333";
peer-port-random-on-start = true;
};
};
resilio = {
2023-07-22 04:46:08 +00:00
enable = false;
2023-07-18 13:52:59 +00:00
deviceName = "Gangly4670";
enableWebUI = true;
directoryRoot = downloadDir;
};
2023-07-19 07:08:34 +00:00
kubo = {
2023-07-20 06:33:16 +00:00
enable = false;
2023-07-19 07:08:34 +00:00
dataDir = "/mnt/ipfs";
enableGC = true;
};
2023-07-18 13:52:59 +00:00
nginx = {
enable = true;
virtualHosts = {
default = {
default = true;
locations = {
"/" = {
root = "/var/lib/nginx/html";
};
2023-07-18 14:19:59 +00:00
"/files/" = {
2023-07-18 13:52:59 +00:00
alias = downloadDir;
extraConfig = "autoindex on;";
};
"/transmission" = {
proxyPass = "http://localhost:9091";
};
2023-07-19 07:08:34 +00:00
# resilio
2023-07-22 04:46:08 +00:00
/*
"/sync" = {
2023-07-18 13:52:59 +00:00
proxyPass = "http://localhost:9000";
2023-07-22 04:46:08 +00:00
};
*/
2023-07-19 07:08:34 +00:00
# kubo/ipfs
2023-07-22 04:46:08 +00:00
/*
"/ipfs" = {
proxyPass = "http://localhost:8080";
};
"/ipns" = {
proxyPass = "http://localhost:8080";
};
"/ipfs-ui" = {
proxyPass = "http://localhost:5001/webui/";
};
*/
2023-07-18 13:52:59 +00:00
};
};
};
};
samba = {
enable = true;
shares = {
share = {
path = downloadDir;
browseable = "yes";
"read only" = true;
};
};
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
libraspberrypi
];
2023-07-18 14:15:45 +00:00
programs = {
git.enable = true;
};
2023-07-18 13:52:59 +00:00
}