summary refs log tree commit diff
path: root/configuration/configuration.nix
blob: e8e20e2e96a1fc8778f7039e462065b244c62c2d (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
  config,
  lib,
  pkgs,
  credentials,
  ...
}:

{
  imports = [
    ./hardware.nix
    ./devices.nix
    ./specimen.nix
  ];

  nix.settings.experimental-features = [
    "flakes"
    "nix-command"
  ];

  networking.hostName = "specimen";
  time.timeZone = "Europe/Berlin";
  i18n.defaultLocale = "en_US.UTF-8";

  users.mutableUsers = false;
  users.users = {
    mel = with credentials.mel; {
      isNormalUser = true;
      extraGroups = [ "wheel" ];
      hashedPassword = password;
      openssh.authorizedKeys.keys = keys;
    };

    philip = with credentials.philip; {
      isNormalUser = true;
      extraGroups = [ "wheel" ];
      hashedPassword = password;
      openssh.authorizedKeys.keys = keys;
    };
  };

  environment.systemPackages = with pkgs; [
    vim
    git
    wget
    agenix
  ];

  services.openssh = {
    enable = true;
    settings = {
      # i would disable this, but i don't know the ssh keys for all accounts :)
      PasswordAuthentication = true;
      AllowUsers = [
        "mel"
        "philip"
      ];
      PermitRootLogin = "no";
    };
  };

  system.stateVersion = "24.11";
}