-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
40 lines (33 loc) · 953 Bytes
/
configuration.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# config for the node
{ config, pkgs, lib, ... }:
{
imports =
[
# hardware info
./kvm-configuration.nix
];
# use efi
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# time zone.
time.timeZone = "America/Toronto";
networking.useDHCP = false;
networking.interfaces.ens18.useDHCP = true;
# set up users
users.users.blobcode = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINeZA/KtZLgoCxrmi9XFqmuSOdYmAUmZMVDyOnPW5ZhQ" ];
};
# allow root to use blob's ssh key
users.users.root.openssh.authorizedKeys.keys =
config.users.users.blobcode.openssh.authorizedKeys.keys;
# enable ssh
services.openssh = {
enable = true;
passwordAuthentication = false;
permitRootLogin = "yes";
};
# DO NOT CHANGE
system.stateVersion = "21.11";
}