aboutsummaryrefslogtreecommitdiff
path: root/modules/common/default.nix
blob: cfd9502b843f54a8935da762219c4cb92f06a1e0 (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
64
65
66
67
{
  config,
  lib,
  pkgs,
  ...
}:

{
  imports = [
    ./nix-settings.nix
    ./networking.nix
  ];

  # Time and Locale
  time.timeZone = "UTC";
  i18n.defaultLocale = "en_US.UTF-8";
  console = {
    font = "Lat2-Terminus16";
    keyMap = "us";
  };

  # Disable emergency mode so boot continues
  systemd.enableEmergencyMode = false;

  # Default Packages Set
  environment.systemPackages = with pkgs; [
    git
    vim
    htop
    wget
    nftables
    wireguard-tools
    tmux
    fd
    ripgrep

    docker-compose
  ];

  programs.vim = {
    enable = true;
    defaultEditor = true;
  };

  nixpkgs.config.allowUnfree = true;

  # Security
  security.sudo.wheelNeedsPassword = false;
  services.openssh = {
    enable = true;
    openFirewall = true;
    settings = {
      PasswordAuthentication = false;
      PermitRootLogin = "no";
    };
  };

  virtualisation.oci-containers.backend = "podman";

  # CPU
  powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

  # System state version
  system.stateVersion = lib.mkDefault "23.05";
}