Add Davids Server to machines.

This commit is contained in:
Kevin Baensch 2019-08-27 16:08:55 +02:00
parent f18761a046
commit 5d017ce18f
2 changed files with 62 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
imports = [
./hardware-configuration.nix
];
system.autoUpgrade.enable = false;
programs.zsh.promptInit = "PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[magenta]%}%n@)%m %{$fg_bold[green]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '";
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03";
}

View file

@ -0,0 +1,44 @@
{ lib, ... }:
with lib;
{
imports = [
../../options/machine.nix
];
config.machine = rec {
hostName = "DavidsServer";
administrators = [ { name = "david"; id = 1000; } ];
mailAccounts = [ "david" ];
domain = "davids-planet.de";
allowUnfree = true;
conffiles = [
"security"
"zsh"
];
pkgs = [
"base"
"server"
];
services = [
"fail2ban"
"mailserver"
"mariaDB"
"nextcloud"
"nginx"
"openssh"
];
vHosts = (let base = domain; in [
{ domain = base; service = "nextcloud"; }
{ domain = "mail.${base}"; service = "mail"; }
]);
firewall = {
allowPing = false;
allowedUDPPorts = [ 22 80 443 ];
allowedTCPPorts = [ 80 443 ];
allowedUDPPortRanges = [];
allowedTCPPortRanges = [];
};
};
}