summaryrefslogtreecommitdiff
path: root/hosts/omar/configuration.nix
blob: 62a6d693756b53a95f8a19e367d5ef93e9eb8cd9 (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,
  ...
}: {
  imports = [
    # Include the results of the hardware scan.
    ./hardware-configuration.nix

    ../../shared/nixos/common-nix-settings
    ../../shared/nixos/common-shell-settings
    ../../shared/nixos-and-darwin/common-hm-settings
    ../../shared/nixos/zfs-impermenance
    ../../shared/nixos/persist-ssh-host-keys
    ../../shared/nixos/danish

    ./wireless-networking
    ./desktop-environment
  ];

  boot.loader.grub = {
    # Use the GRUB 2 boot loader.
    enable = true;

    # Install grub on the main HDD.
    device = "/dev/sda";

    # ZFS on root requires GRUB to be able to read the pool.
    # The pool was created with `-o compatibility=grub2`.
    zfsSupport = true;
  };

  # The host id is required by ZFS.
  # It is used to (among other things) avoid multiple hosts modifying the same dataset unsafely.
  # This was randomly generated.
  networking.hostId = "b6e8e80a";

  # Should match containing folder.
  networking.hostName = "omar";

  # Create the main user.
  users.users.linus = {
    isNormalUser = true;
    hashedPassword = "$y$j9T$UmZES4WC8FWrjBvdazq2e/$rzneAKZeySwSVKiSZJfXC.fciiQdGqxB5uyRaPQ6OF.";
    extraGroups = ["wheel"];
  };
  users.mutableUsers = false;

  home-manager.users.linus = {
    imports = [
      # I am planning on using this host when traveling.
      ../../shared/home-manager/development-full
      ../../shared/home-manager/firefox
    ];
    home.stateVersion = "24.11";
  };

  # Enable the OpenSSH daemon.
  services.openssh.enable = true;

  system.stateVersion = "24.11";
}