aboutsummaryrefslogtreecommitdiffstats
path: root/modules/nixos/default.nix
blob: 8542ae0a74d9de38c9a72f62583a73eef9fb365a (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
{ pkgs, lib, ... }:

{
  imports = [ ];

  # Enable experimental Nix features
  nix.settings.experimental-features = "nix-command flakes";

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

  # Bootloader
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  # Networking
  networking.hostName = "nixbox";
  networking.networkmanager.enable = true;

  # Timezone / locale
  time.timeZone = "Europe/Oslo";
  i18n.defaultLocale = "en_US.UTF-8";

  # User account
  users.users.simenandre = {
    isNormalUser = true;
    extraGroups = [ "wheel" "networkmanager" ];
    shell = pkgs.zsh;
    openssh.authorizedKeys.keys = [
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDDXfT23Ne7Rl/rdiqrLf4vWfQqgUCo26+NcL41PVSag"
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJwHftCdnV/pscQ4qCK/biIBsKk/G0A3hLVI1o62CJF4 so@bjerk.io"
    ];
  };
  programs.zsh.enable = true;

  # Core system packages
  environment.systemPackages = with pkgs; [
    curl
    gcc
    git
    wget
    neovim
    ghostty.terminfo
  ];

  # 1Password (for SSH signing)
  programs._1password.enable = true;
  programs._1password-gui.enable = true;

  # SSH
  services.openssh.enable = true;

  # System state version – do not change after first installation
  system.stateVersion = "24.11";
}