From ae3fa667bda75f11881c9209dc67226f98bcfd95 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Thu, 17 Sep 2026 11:05:45 +0200 Subject: Add cross-platform Nix flake bootstrap Adds a flake providing shared modules for NixOS and standalone home-manager, a copyable NixOS host template, and the OpenSpec tooling/change scaffolding used to plan this work. --- hosts/template/configuration.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 hosts/template/configuration.nix (limited to 'hosts/template/configuration.nix') diff --git a/hosts/template/configuration.nix b/hosts/template/configuration.nix new file mode 100644 index 0000000..192ccb5 --- /dev/null +++ b/hosts/template/configuration.nix @@ -0,0 +1,23 @@ +# Copy-source only — this directory is never wired into flake.nix as a real +# nixosConfigurations output. To bootstrap a real host: +# cp -r hosts/template hosts/ +# then edit the CHANGEME values below and replace hardware-configuration.nix +# with the output of `nixos-generate-config`. See README.md for the full flow. +{ ... }: +{ + imports = [ ./hardware-configuration.nix ]; + + networking.hostName = "CHANGEME"; + + # UEFI (most modern machines): + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + # BIOS/legacy alternative — comment out the two lines above and use instead: + # boot.loader.grub.enable = true; + # boot.loader.grub.device = "/dev/sdX"; + + # Set to the NixOS release in use by the installer at install time + # (e.g. "24.05"). This only affects on-disk state format compatibility — + # never change it after the fact. + system.stateVersion = "CHANGEME"; +} -- cgit v1.3