Introduction
Statistics
Contact
Development
Disclaimer
Help
config, pkgs, ... }:
et
system-hostname = "solene-amsterdam";
ipv4-address = "46.23.92.2";
ipv4-gateway = "46.23.92.1";
ipv6-address = "2a03:6000:6f72:640::2";
ipv6-gateway = "2a03:6000:6f72:640::9";
regular-user = "solene";
ssh-keys = "ssh-ed25519 AcAbC3NZaC1lZDIaNTE5ATAAIOIZKLFgXVMz5viQXHYRjGqt6LLfvE…
n
imports =
[
./hardware-configuration.nix
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/headless.nix>
];
boot.loader.grub.device = "/dev/vda";
boot.loader.grub.extraConfig = "
serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1
terminal_input console
terminal_output console
";
boot.kernelParams = [
"console=ttyS0,115200n8"
];
networking.hostName = "${system-hostname}";
networking.usePredictableInterfaceNames = true;
networking.dhcpcd.enable = false;
networking = {
interfaces.eth0 = {
ipv4.addresses = [
{ address = "${ipv4-address}"; prefixLength = 26; }
];
ipv6.addresses = [
{ address = "${ipv6-address}"; prefixLength = 64; }
];
};
defaultGateway = { address = "${ipv4-gateway}"; interface = "eth0"; };
defaultGateway6 = { address = "${ipv6-gateway}"; interface = "eth0"; };
nameservers = [ "9.9.9.9" ];
};
time.timeZone = "Europe/Amsterdam";
systemd.services."serial-getty@ttyS0" = {
enable = true;
wantedBy = [ "getty.target" ];
serviceConfig.Restart = "always";
};
i18n.defaultLocale = "fr_FR.UTF-8";
console.keyMap = "fr";
users.users."${regular-user}" = {
openssh.authorizedKeys.keys = [ "${ssh-keys}" ];
isNormalUser = true;
extraGroups = [ "wheel" "sudo" ];
};
environment.systemPackages = with pkgs; [
kakoune
];
services.openssh.enable = true;
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ ];
system.copySystemConfiguration = true;
# don't touch this
system.stateVersion = "22.11";