# Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). { ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ./packages.nix ./servers.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "cherry"; # Define your hostname. # Set your time zone. time.timeZone = "Europe/London"; # Select internationalisation properties. i18n.defaultLocale = "en_GB.UTF-8"; # console = { # font = "Lat2-Terminus16"; # keyMap = "us"; # useXkbConfig = true; # use xkb.options in tty. # }; nix.optimise.automatic = true; nix.gc = { automatic = true; dates = "weekly"; options = "--delete-older-than 30d"; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users = { root.hashedPassword = "!"; # Disable root login ivo = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMvb1u92smPBaQDUbKuXWaPq4dFA9a1Ce3Oq8Xvyzuyb" ]; }; }; security.sudo.wheelNeedsPassword = false; environment.enableAllTerminfo = true; # List services that you want to enable: # Enable the OpenSSH daemon. services.openssh = { enable = true; settings = { PermitRootLogin = "no"; PasswordAuthentication = false; KbdInteractiveAuthentication = false; }; }; programs.ssh.startAgent = true; services.fail2ban.enable = true; # Open ports in the firewall. networking.firewall.allowedTCPPorts = [ 22 80 443 ]; # Configure IPv6 on Hetzner networking.interfaces.enp1s0.ipv6.addresses = [ { address = "2a01:4f9:c012:5a53::1"; prefixLength = 64; } ]; networking.defaultGateway6 = { address = "fe80::1"; interface = "enp1s0"; }; # 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 = "25.05"; # Did you read the comment? }