{ config, lib, pkgs, ... }: { imports = [ ./hardware-configuration.nix ]; security.pam.loginLimits = [{ domain = "*"; type = "soft"; item = "nofile"; value = "8192"; }]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.download-buffer-size = 6710886400; boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only networking.hostName = "authentik"; networking.interfaces.ens18.ipv4.addresses = [ { address = "10.0.0.3"; prefixLength = 24; } ]; networking.defaultGateway.address = "10.0.0.1"; networking.nameservers = [ "141.56.1.1" "141.56.1.2" ]; time.timeZone = "Europe/Berlin"; i18n.defaultLocale = "en_US.UTF-8"; console = { font = "Lat2-Terminus16"; keyMap = lib.mkForce "de"; useXkbConfig = true; # use xkb.options in tty. }; users.users.administration = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ ]; }; environment.systemPackages = with pkgs; [ tmux git htop neovim ]; services.openssh.enable = true; services.authentik = { enable = true; # The environmentFile needs to be on the target host! # Best use something like sops-nix or agenix to manage it environmentFile = "/var/lib/authentik_secret"; settings = { email = { host = "mail.stura.htw-dresden.de"; port = 25; username = "authentik@stura.htw-dresden.de"; use_tls = false; use_ssl = false; from = "authentik@stura.htw-dresden.de"; }; disable_startup_analytics = true; avatars = "initials"; }; }; # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 389 9000 ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. # system.copySystemConfiguration = true; # This option defines the first version of NixOS you have installed on this particular machine, # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. # # Most users should NEVER change this value after the initial install, for any reason, # even if you've upgraded your system to a new NixOS release. # # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how # to actually do that. # # This value being lower than the current NixOS release does NOT mean your system is # out of date, out of support, or vulnerable. # # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, # and migrated your data accordingly. # # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . system.stateVersion = "24.11"; # Did you read the comment? }