Last active
September 5, 2019 18:36
-
-
Save jpf/26f5f105eeccd6c8785a86af5d02fc98 to your computer and use it in GitHub Desktop.
This file contains hidden or 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, ... }: | |
let | |
chatServer = "chat.example.com"; | |
in | |
{ | |
imports = [ | |
./hardware-configuration.nix | |
]; | |
boot.loader.grub.enable = true; | |
boot.loader.grub.version = 2; | |
networking.usePredictableInterfaceNames = false; | |
environment.systemPackages = with pkgs; [ | |
inetutils | |
mtr | |
sysstat | |
vim | |
emacs | |
lsof | |
jq | |
git | |
]; | |
services.nginx = { | |
enable = true; | |
virtualHosts."${chatServer}" = { | |
addSSL = true; | |
enableACME = true; | |
locations."/" = { | |
proxyPass = "http://localhost:8065/"; | |
}; | |
}; | |
}; | |
services.openssh = { | |
enable = true; | |
passwordAuthentication = false; | |
}; | |
services.mattermost = { | |
enable = true; | |
siteUrl = "https://${chatServer}/"; | |
}; | |
networking.firewall.allowedTCPPorts = [ 22 80 443 ]; | |
users.users.nato = { | |
isNormalUser = true; | |
home = "/home/user1"; | |
description = "User1"; | |
extraGroups = [ "wheel" "networkmanager" ]; | |
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAexample1" ]; | |
}; | |
users.users.joel = { | |
isNormalUser = true; | |
home = "/home/joel"; | |
description = "Joel"; | |
extraGroups = [ "wheel" "networkmanager" ]; | |
openssh.authorizedKeys.keys = [ "ssh-rsa AAAA0example2" ]; | |
}; | |
} |
This file contains hidden or 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, lib, pkgs, ... }: | |
{ | |
imports = | |
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> | |
]; | |
boot.kernelParams = [ "console=ttyS0,19200n8" ]; | |
boot.loader.grub.extraConfig = '' | |
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1; | |
terminal_input serial; | |
terminal_output serial | |
''; | |
boot.loader.grub.device = "nodev"; | |
boot.loader.timeout = 10; | |
boot.initrd.availableKernelModules = [ "virtio_pci" "ahci" "sd_mod" ]; | |
boot.initrd.kernelModules = [ ]; | |
boot.kernelModules = [ ]; | |
boot.extraModulePackages = [ ]; | |
fileSystems."/" = | |
{ device = "/dev/sda"; | |
fsType = "ext4"; | |
}; | |
swapDevices = | |
[ { device = "/dev/sdb"; } | |
]; | |
nix.maxJobs = lib.mkDefault 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment