feat(flake): add consumer template (nix flake init -t)

Expose templates.default — a starter flake that consumes OmniXY as an
input (dependency model): omnixy.lib.mkSystem + nixosModules.omnixy +
a placeholder host. Lets adopters track OmniXY with `nix flake update`
instead of forking. See templates/default/README.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-28 10:38:14 +02:00
commit f6b8ddf598
5 changed files with 167 additions and 0 deletions

View file

@ -0,0 +1,41 @@
{
description = "My NixOS machine(s), built on Omnixient";
inputs = {
# Pin Omnixient. Point this at the canonical repo or your own fork, and
# ideally pin a release tag (…/omni/v1.0.0) for reproducible updates:
# nix flake update omni # pull the latest Omnixient, never touches your config
omni.url = "github:<your-org>/omnixient";
# Reuse Omnixient's nixpkgs so you evaluate a single package set.
nixpkgs.follows = "omni/nixpkgs";
};
outputs =
{ omni, ... }:
let
# Your identity + machine settings. Omnixient core reads `settings.theme`;
# the home config reads the rest. Edit these.
settings = {
user = "alice";
gitName = "Alice Example";
gitEmail = "alice@example.com";
hostName = "myhost";
timeZone = "America/New_York";
theme = "tokyo-night"; # any module under Omnixient's modules/themes/
sshKeys = [ ]; # e.g. [ "ssh-ed25519 AAAA… alice@myhost" ]
stateVersion = "24.11"; # release you first installed — never change
};
in
{
nixosConfigurations.${settings.hostName} = omni.lib.mkSystem settings.hostName {
system = "x86_64-linux";
user = settings.user;
extraSpecialArgs = { inherit settings; };
extraHmArgs = { inherit settings; };
modules = [
omni.nixosModules.omni # Omnixient desktop/system core
./hosts/myhost # your hardware + option choices
];
};
};
}