Generate my configuration
Networking
Choose your network configuration
Usage bundles
Choose your usage bundles (multiple choices possible if your machine can handle it)
Services
👆 Choose any upper bundle to make associated services appear.
Other configuration
Auto-generated configuration.nix file
{ pkgs, ... }:
{
networking.hosts = {
"127.0.0.1" = [ ".nixin.local" ];
};
networking.hostName = "";
networking.domain = "nixin.local";
networking.firewall = {
allowedTCPPorts = [
80
443
];
};
time.timeZone = "UTC";
i18n.defaultLocale = "en_US.UTF-8";
users.users.operator = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "CHANGE ME !!!";
};
security.sudo.extraRules= [
{
users = [ "operator" ];
commands = [
{
command = "ALL" ;
options= [ "NOPASSWD" ]; # "SETENV" # Adding the following could be a good idea
}
];
}
];
security.acme.defaults.email = "contact@nixin.local";
security.acme.acceptTerms = true;
services.nginx = {
enable = true;
# Use recommended settings
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
# Only allow PFS-enabled ciphers with AES256
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
virtualHosts."hedgedoc.nixin.local" = {
forceSSL = true;
enableACME = true;
root = "/var/www/hedgedoc";
locations."/".proxyPass = "http://127.0.0.1:8001";
locations."/socket.io/" = {
proxyPass = "http://127.0.0.1:8001";
proxyWebsockets = true;
extraConfig = "proxy_ssl_server_name on;";
};
};
};
environment.systemPackages = with pkgs; [
git
wget
tmux
mosh
htop
];
system.stateVersion = "24.05";
}