initial commit
This commit is contained in:
commit
733dce18a0
11 changed files with 295 additions and 0 deletions
36
server/configuration.nix
Normal file
36
server/configuration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ 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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue