···
./hardware-configuration.nix
8
-
nixpkgs.hostPlatform.system = "x86_64-linux";
9
+
systemd-boot.enable = true;
10
+
efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
10
-
system.stateVersion = "22.11";
12
-
services.openssh = {
14
-
settings.passwordAuthentication = false;
environment.systemPackages = with pkgs; [
vim # for editing config files
18
+
# TODO add any other programs you want to install here
22
-
users.users.root = {
23
-
initialHashedPassword = "";
24
-
users.users.root.openssh.authorizedKeys.keys = [
25
-
# "ssh-ed25519 <key> <name>"
21
+
# very simple prompt
22
+
programs.bash.promptInit = ''
27
+
# TODO set hashed password from `nix run nixpkgs#mkpasswd`
28
+
root.initialHashedPassword = "";
29
+
# TODO change username, if desired
31
+
isNormalUser = true;
32
+
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
33
+
initialHashedPassword = root.initialHashedPassword;
34
+
# TODO define SSH keys if accessing remotely
35
+
openssh.authorizedKeys.keys = [
36
+
# "ssh-ed25519 <key> <name>"
41
+
services.openssh = {
43
+
settings.passwordAuthentication = false;
# TODO replace this with domain
networking.domain = "example.org";
security.acme.acceptTerms = true;
50
+
# TODO select internationalisation properties
51
+
i18n.defaultLocale = "en_GB.UTF-8";
52
+
time.timeZone = "Europe/London";
53
+
console.keyMap = "uk";
# TODO replace these values
···
serverIpv6 = "2001:DB8::/64";
publicInterface = "eth0";
63
+
# TODO enable desired services
# mailserver.enable = true;
···
72
+
# This value determines the NixOS release from which the default
73
+
# settings for stateful data, like file locations and database versions
74
+
# on your system were taken. It's perfectly fine and recommended to leave
75
+
# this value at the release version of the first install of this system.
76
+
# Before changing this value read the documentation for this option
77
+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
78
+
system.stateVersion = "23.05"; # Did you read the comment?