-
-
Save anonymous/307d2759b49c662a044a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
# Use the GRUB 2 boot loader. | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 2; | |
# Define on which hard drive you want to install Grub. | |
boot.loader.grub.device = "/dev/sda"; | |
networking.hostName = "nixos"; | |
networking.firewall.allowPing = true; | |
networking.firewall.allowedTCPPorts = [ 80 443 ]; | |
environment.systemPackages = [ pkgs.python ]; | |
# List services that you want to enable: | |
services.nginx = { | |
enable = true; | |
config = '' | |
error_log /www/error.log; | |
events {} | |
http { | |
server { | |
access_log /www/access.log; | |
listen 80; | |
server_tokens off; | |
root /www/root; | |
} | |
} | |
''; | |
}; | |
# Enable the OpenSSH daemon. | |
services.openssh.enable = true; | |
# Define a user account. | |
users.extraUsers.user = { | |
name = "user"; | |
createHome = true; | |
home = "/home/user"; | |
extraGroups = [ "wheel" ]; | |
useDefaultShell = true; | |
openssh.authorizedKeys.keys = [ "ssh-rsa AAAA... user@host.local" ]; | |
}; | |
security.sudo.wheelNeedsPassword = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment