summaryrefslogtreecommitdiff
path: root/profiles/core/configuration.nix
blob: 1fcb1394308ff03758478e62d89e58a574dedd75 (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
{
  config,
  pkgs,
  lib,
  ...
}: with lib; {
  imports = [ (mkAliasOptionModule [ "ivi" ] [ "users" "users" ivi.username ]) ];

  time.timeZone = "Europe/Amsterdam";
  users.users = {
      ${ivi.username} = {
        uid = 1000;
        isNormalUser = true;
        description = ivi.realName;
        extraGroups = ["wheel" "networkmanager" "docker" "transmission"];
        openssh.authorizedKeys.keys = ivi.sshKeys;
      };
      root = {
        hashedPasswordFile = config.secrets.root.path;
        openssh.authorizedKeys.keys = config.ivi.openssh.authorizedKeys.keys;
      };
  };
  security = {
    sudo = {
      wheelNeedsPassword = false;
      extraConfig = ''
        Defaults env_keep+="EDITOR"
        Defaults env_keep+="SSH_CONNECTION SSH_CLIENT SSH_TTY"
        Defaults env_keep+="http_proxy https_proxy"
      '';
    };
  };
  environment.systemPackages = with pkgs; [
    man-pages
    man-pages-posix
    vim
    wget
    git
    jq
    yq-go
    curl
    pinentry-curses
    gnused
    htop
    pciutils
    dnsutils
    iputils
    inetutils
    usbutils
  ];

  nix.package = pkgs.nixUnstable;
  nix.extraOptions = ''
    experimental-features = nix-command flakes
  '';
}