36 lines
932 B
Nix
36 lines
932 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
imports = [ ../common.nix ./hardware-configuration.nix ];
|
|
boot.kernelParams = [ "memmap=0x4000%0xbfb76000-4" "memmap=0x4000%0xbfb7a000-4" ];
|
|
networking = {
|
|
hostName = "nixos-server";
|
|
networkmanager.ensureProfiles.profiles.home-wifi = {
|
|
wifi.ssid = "bogale_2.4";
|
|
wifi-security.psk = builtins.readFile "/root/secrets/home-wifi.psk";
|
|
};
|
|
firewall = {
|
|
allowedTCPPorts = [ 80 ];
|
|
extraInputRules = ''
|
|
ip saddr 192.168.1.0/24 tcp dport 22 accept
|
|
'';
|
|
};
|
|
};
|
|
services = {
|
|
openssh = {
|
|
enable = true;
|
|
openFirewall = false;
|
|
};
|
|
nginx = {
|
|
enable = true;
|
|
virtualHosts."_".default = true;
|
|
virtualHosts."_" = {
|
|
locations."/" = {
|
|
return = "200 '<html><body>It works</body></html>'";
|
|
extraConfig = ''
|
|
default_type text/html;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|