bib3.de-nixos/configuration.nix

80 lines
2.5 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# 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
./matrix-synapse.nix
./nginx.nix
./openldap.nix
./fail2ban.nix
./git.nix
./postgres.nix
./sd.nix
];
# Boot
boot.loader.grub.enable = false;
boot.loader.generic-extlinux-compatible.enable = true;
services.journald.extraConfig = ''
MaxRetentionSec=7day
'';
# Kernel configuration
boot.kernelPackages = pkgs.linuxPackages_rpi4;
boot.kernelParams = [ "console=ttyAMA0,115200n8" ];
# Enable additional firmware (such as Wi-Fi drivers).
hardware.enableRedistributableFirmware = true;
networking.hostName = "levitest"; # Define your hostname.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
security.acme.email = "webmaster@bib3.de";
security.acme.acceptTerms = true;
# Set your time zone.
time.timeZone = "UTC";
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.allowPing = false;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
# Define a user account. Don't forget to set a password with passwd.
users.users.loooph = {
isNormalUser = true;
home = "/home/loooph";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 30d";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget vim_configurable vimPlugins.ale vimPlugins.vim-nix git htop tmux openssl fd
];
}