2019-05-03 21:51:43 +02:00
|
|
|
|
# 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’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
2019-05-10 23:21:28 +02:00
|
|
|
|
./variables.nix
|
|
|
|
|
./mailserver.nix
|
2019-05-03 21:51:43 +02:00
|
|
|
|
];
|
|
|
|
|
|
2019-05-10 23:21:28 +02:00
|
|
|
|
# Use the staging environment of Let's encrypt and accept their certificates as well...
|
|
|
|
|
security.acme.production = false;
|
|
|
|
|
security.pki.certificates = [
|
|
|
|
|
''
|
|
|
|
|
-----BEGIN CERTIFICATE-----
|
|
|
|
|
MIIFATCCAumgAwIBAgIRAKc9ZKBASymy5TLOEp57N98wDQYJKoZIhvcNAQELBQAw
|
|
|
|
|
GjEYMBYGA1UEAwwPRmFrZSBMRSBSb290IFgxMB4XDTE2MDMyMzIyNTM0NloXDTM2
|
|
|
|
|
MDMyMzIyNTM0NlowGjEYMBYGA1UEAwwPRmFrZSBMRSBSb290IFgxMIICIjANBgkq
|
|
|
|
|
hkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA+pYHvQw5iU3v2b3iNuYNKYgsWD6KU7aJ
|
|
|
|
|
diddtZQxSWYzUI3U0I1UsRPTxnhTifs/M9NW4ZlV13ZfB7APwC8oqKOIiwo7IwlP
|
|
|
|
|
xg0VKgyz+kT8RJfYr66PPIYP0fpTeu42LpMJ+CKo9sbpgVNDZN2z/qiXrRNX/VtG
|
|
|
|
|
TkPV7a44fZ5bHHVruAxvDnylpQxJobtCBWlJSsbIRGFHMc2z88eUz9NmIOWUKGGj
|
|
|
|
|
EmP76x8OfRHpIpuxRSCjn0+i9+hR2siIOpcMOGd+40uVJxbRRP5Z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
|
|
|
zbh4Ps5YBnG6CKJPTbe2hfi3nhnw/MyEmF3zb0hzvLWNrR9XW3ibb2oL3424XOwc
|
|
|
|
|
VjrTSCLzO9Rv6s5wi03qoWvKAQQAElqTYRHhynJ3w6wuvKYF5zcZF3MDnrVGLbh1
|
|
|
|
|
Q9ePRFBCiXOQ6wPLoUhrrbZ8LpFUFYDXHMtYM7P9sc9IAWoONXREJaO08zgFtMp4
|
|
|
|
|
8iyIYUyQAbsvx8oD2M8kRvrIRSrRJSl6L957b4AFiLIQ/GgV2curs0jje7Edx34c
|
|
|
|
|
idWw1VrejtwclobqNMVtG3EiPUIpJGpbMcJgbiLSmKkrvQtGng==
|
|
|
|
|
-----END CERTIFICATE-----
|
|
|
|
|
''
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Configuration options for the mailserver
|
|
|
|
|
variables = {
|
|
|
|
|
mailAdmin = "postmaster@mail2.hamburg.freifunk.net";
|
|
|
|
|
useSSL = true;
|
|
|
|
|
};
|
2019-05-03 21:51:43 +02:00
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
|
# boot.loader.grub.efiSupport = true;
|
|
|
|
|
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
|
|
|
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
|
|
|
# Define on which hard drive you want to install Grub.
|
|
|
|
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
|
|
|
|
|
|
|
|
|
networking = {
|
2019-05-10 23:17:33 +02:00
|
|
|
|
hostName = "mail2";
|
|
|
|
|
domain = "hamburg.freifunk.net";
|
2019-05-03 21:51:43 +02:00
|
|
|
|
dhcpcd.enable = false;
|
|
|
|
|
interfaces.ens3 = {
|
|
|
|
|
ipv4.addresses = [ { address = "193.96.224.229"; prefixLength = 29; } ];
|
2019-05-10 23:17:33 +02:00
|
|
|
|
ipv4.routes = [
|
|
|
|
|
{ address = "100.64.112.248"; prefixLength = 29; }
|
|
|
|
|
{ address = "10.112.0.0"; prefixLength = 16; via = "100.64.112.251"; }
|
|
|
|
|
];
|
2019-05-03 21:51:43 +02:00
|
|
|
|
ipv6.addresses = [ { address = "2a03:2267:ffff:c00::e"; prefixLength = 64; } ];
|
|
|
|
|
};
|
|
|
|
|
defaultGateway = { address = "193.96.224.225"; };
|
|
|
|
|
defaultGateway6 = { address = "2a03:2267:ffff:c00::1"; };
|
|
|
|
|
nameservers = [ "8.8.8.8" ];
|
|
|
|
|
firewall.rejectPackets = true;
|
|
|
|
|
};
|
|
|
|
|
|
2019-05-03 21:58:43 +02:00
|
|
|
|
# Automatic update each day at 04:40. Will not restart the system, so a reboot every now and then is a good idea.
|
|
|
|
|
system.autoUpgrade.enable = true;
|
|
|
|
|
|
2019-05-03 21:51:43 +02:00
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n = {
|
|
|
|
|
# consoleFont = "Lat2-Terminus16";
|
|
|
|
|
# consoleKeyMap = "us";
|
|
|
|
|
defaultLocale = "de_DE.UTF-8";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Europe/Berlin";
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2019-05-10 20:27:40 +02:00
|
|
|
|
git htop lsof nano sqlite tcpdump traceroute vim wget
|
2019-05-03 21:51:43 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
programs.mtr.enable = true;
|
|
|
|
|
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
services.openssh.enable = true;
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
2019-05-10 23:18:14 +02:00
|
|
|
|
users.extraUsers."Entil_Zha" = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAzeqpZiYL+NFikGyVU7h+5nvAovlJBQfwQHE7mXkYVokHDCykHDUZfeR2HKARaGnCcYyvWHZeZPDJzQg05INRZyook82qKhqc/aICthP0dolr8ImYsilkbSPd1SttZWEsURVz8UO9NtM6n++04p6ArCRL4eZMzq8OeeGc+Vmyu4jRcsIA3t6kuXJ5FECmNn9YOmV8gX5WOzN0akPRwlE1XmBszU7r+OktYOmg4P7kJpmRoV8hR6zBtAcSjCuELJhE7aKGa2UnIoWzLMt5JV0JP4fPjbZxYpWmGxwLgIp/YXuJ/+xVwGTAjUXanqyV4RPpSNQa78CZ4g5rW7ak9xWN46ChWO9ishQDak2o6jdCli2Vjj32ap/snfDMiHylbbgpdmF2l8CTTo2GODfvKEZI1kzFz/Cfeky/uZzvvVjgbVUAwIFscFWyTpgnZibEA/H5xCkVxI+icFzQALgnBVY/75Jw8jrdUzcMDWNKjMaGhegXJAuIZXueDJTuxiZcAXXTWdPqQCTitQitE6Gf/gnijmtBBKT3uVk/ZBwhZH5GrBRNL+A3dlHAqGvl1SlajQtAzhaZmEp1yIeObhzXJKi41vHSOxfJzQDqQz0H2ljmAK6c/0bEyohxiQ3+/pIyvHG4hgSKWG8ng7Np2bD7xoWV7WgZBys3TsDZdeTu8xMyl7U="
|
|
|
|
|
];
|
|
|
|
|
};
|
2019-05-03 21:51:43 +02:00
|
|
|
|
users.extraUsers.root =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N8gCGEhxFZ2vKHcOU8rfMPHwNbAQHW9PXhb9jNIkRck3CM8LwiUxm8Ya5BEwx5BJgoBSsPT6verLJ74uVNttDuPsz+mqey9nM01Wlt86d06WE5YjQb/AEpg+uKW9LZ63fwltgWn leo"
|
|
|
|
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDbTKYDYRivHfk/nDYvrgV51DFMkmDwnet1iaFoNTEqx99rVPQMchlKtCEwzKiuzjPyc7ztrMpnCkUKIhBs2C5eVoWHtiCebFn5jMM6YA1+/gP0xJF+n9YjO6BIQC1MeppSjO/yP/rjcrEc1DVAY95ofDge94vRAeAUhADDOvEqUd3OOvRwc5WWN+PuCnnSqo1am9NMMyZftI9FpkpswKhkEQfIteadEVySWQtO4rs5GC6JcfE2ZIZEEjp9tMm7zr6FNnCJNuuTU4trWUJDKRiKnyNyKb9GZHQ+LA1VPN8Xyi0gVhdyE5I9z83xTeYRbmW49gtJ9iCQxzcBaylByTRZQYLZWoQIqOBtjVx08CwMM4g+U9JvEULqkRbxmfO9kCPGSm1ZrUN4Dfz087Lt3kebq+sGIgD/yJG5ZS5hbLjq3+ClQA9C6pgu8xsidgDNZV+f8h6pEBTFH5bdhOvJVa3XdemlKKD5VxZdjPlgqrBBobVkCvvwucCXUqpcHRTaygwlQzWMUFonxdJF3sil+x5d9UtJyPt6CH8QHOVeTKe67TgS3b6LA0WscUGhSFqwaOGaNEiHWqCWj/mM6AdepWHuspW4mbSv2cUk5wxIXqj0JVqE5bY9iiRODpOpx2a3+XhSLA8JVgvm7JRY1+tG9/PwtsoSvv3/y3IPcQHYIfmYXw== openpgp:0x36379070 leo"
|
2019-05-10 23:18:14 +02:00
|
|
|
|
];
|
|
|
|
|
};
|
2019-05-03 21:51:43 +02:00
|
|
|
|
|
|
|
|
|
# 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"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|