diff --git a/hosts/example/default.nix b/hosts/example/default.nix new file mode 100644 index 0000000..9bffc1b --- /dev/null +++ b/hosts/example/default.nix @@ -0,0 +1,46 @@ +# hosts/example/ — copy-me template for a new Omnixient host. +# +# Adopt in five steps: +# 1. cp -r hosts/example hosts/ +# 2. Generate YOUR hardware scan (replaces the placeholder): +# sudo nixos-generate-config --show-hardware-config \ +# > hosts//hardware-configuration.nix +# 3. Add a host entry in flake.nix (copy the `example` block, rename it +# to ). Add `devEnv = true;` only if you want the dev-env. +# 4. Fill in settings.nix (user, hostName, stateVersion, sshKeys, …). +# If your username differs from the template's, also create +# users//home-manager.nix (copy users/user/home-manager.nix). +# 5. sudo nixos-rebuild switch --flake .# +# +# Everything here is intentionally minimal — no maintainer-specific +# hardware modules, VPN tunnels, fwupd quirks, or dev-env. Add what you +# want through packs. See docs/getting-started.md and docs/packs.md. +{ lib, inputs, settings, ... }: +{ + imports = [ + # Your machine's hardware scan. The committed file is a PLACEHOLDER — + # replace it (step 2) before building on real hardware. + ./hardware-configuration.nix + + # Optional: a nixos-hardware module for your exact model, e.g. + # inputs.nixos-hardware.nixosModules.framework-13-7040-amd + # inputs.nixos-hardware.nixosModules.dell-xps-15-9520 + # (full list: https://github.com/NixOS/nixos-hardware) + + # Shared Omnixient base: system + Hyprland desktop + theming. + ../../configuration.nix + + # Optional: shared binary caches (substituters + trusted keys). + # ../../modules/cache.nix + ]; + + # Opt into the goodies you want — see docs/packs.md for the full catalog. + omni.packs = { + development.enable = true; + media.enable = true; + containers.enable = true; + # gaming.enable = true; + # office.enable = true; + # bitcoin.enable = true; # needs an explicit import — see docs/packs.md + }; +} diff --git a/hosts/example/hardware-configuration.nix b/hosts/example/hardware-configuration.nix new file mode 100644 index 0000000..ba3e610 --- /dev/null +++ b/hosts/example/hardware-configuration.nix @@ -0,0 +1,44 @@ +# PLACEHOLDER hardware scan — REPLACE before building on real hardware: +# sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix +# +# This generic stub exists only so the `example` host evaluates/builds as a +# template (and so the template can't silently rot in CI). The by-label +# devices below will NOT match your machine — a real scan captures your +# actual disks, filesystems, kernel modules, and CPU microcode. +# +# hostPlatform is set by lib/mksystem.nix; the bootloader (systemd-boot) +# by modules/boot.nix — so this file only needs filesystems. +{ + config, + lib, + modulesPath, + ... +}: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "ahci" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/boot"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + networking.useDHCP = lib.mkDefault true; +}