diff --git a/hosts/hypnos/README.md b/hosts/hypnos/README.md new file mode 100644 index 0000000..772e58f --- /dev/null +++ b/hosts/hypnos/README.md @@ -0,0 +1,35 @@ +# Hypnos + +## Overview +15-inch MacBook Pro 11,3 (Mid 2014). + +## Specs +* CPU - Intel Core i7-4870HQ @ 2.50GHz +* Memory - 16 GB DDR3 +* GPU - Intel Iris Pro 5200 +* GPU - NVIDIA GeForce GT 750M +* NIC - Broadcom BCM43xx 802.11ac + +### Disks +Device | Partitions _(filesystem, size, usage)_ +--- | --- +Apple SSD SM0512F | `/dev/nvme01` (ZFS, 500 GiB, NixOS Root) + +#### ZFS pool layout +``` +rpool/ +├── local +│ ├── nix +│ └── tmp +├── system +│ ├── root +│ └── var +└── user + └── home +``` + +See [Graham Christensen's article](https://grahamc.com/blog/nixos-on-zfs/#datasets) for the motivation behind these datasets. + +### Networks +- DHCP on `10.0.1.0/24` subnet. +- Tailscale on `100.64.0.0/10` subnet. FQDN: `hypnos.mesh.vimium.net`. diff --git a/hosts/hypnos/default.nix b/hosts/hypnos/default.nix new file mode 100644 index 0000000..b396c26 --- /dev/null +++ b/hosts/hypnos/default.nix @@ -0,0 +1,53 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ../desktop.nix + ]; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + networking = { + hostName = "hypnos"; + hostId = "cf791898"; + networkmanager.enable = true; + }; + + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + + modules = { + desktop = { + browsers = { + firefox.enable = true; + }; + }; + dev = { + node.enable = true; + }; + editors = { + neovim.enable = true; + }; + networking = { + wireless.enable = true; + }; + security = { + gpg.enable = true; + pass.enable = true; + }; + shell = { + git.enable = true; + zsh.enable = true; + }; + }; + + system.stateVersion = "22.11"; +} diff --git a/hosts/hypnos/hardware-configuration.nix b/hosts/hypnos/hardware-configuration.nix new file mode 100644 index 0000000..e1dcf2f --- /dev/null +++ b/hosts/hypnos/hardware-configuration.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd.availableKernelModules = [ "xhci_pci" "achi" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" "wl" ]; + extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + }; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} +