A pure Nix static homepage generator. Clean, keyboard-navigable startpages with zero dependencies and full control over layout, colors, etc.
- Declarative layout: define your homepage structure entirely in Nix.
- Theming via sotormd/colors: consistent Nord-like palette for backgrounds, text, accents and fonts.
- Keyboard shortcuts: type the short name to instantly open a link.
- Dynamic hover colors: links smoothly change to aurora tones on hover.
- Pure Nix: uses only
builtins, so it works anywhere without external dependencies.
You can build and preview the included example homepage directly:
nix build github:sotormd/homepageThis creates a symlink result in the current working directory, which can be
opened in the browser.
The flake exposes a single function:
lib.makeHomepageIt takes a layout list, where each element is either:
- a list of links, or
- the string
"separator"(to visually separate sections).
home.lib.makeHomepage {
layout = [
[
{ short = "re"; full = "reddit"; url = "https://reddit.com"; }
{ short = "dc"; full = "discord"; url = "https://discord.com/app"; }
]
"separator"
[
{ short = "yt"; full = "youtube"; url = "https://youtube.com"; }
{ short = "gh"; full = "github"; url = "https://github.com"; }
]
];
n = 2; # grid size (columns per row)
}By default, it uses sotormd/colors. You
can override this by passing your own color flake (see the flakes for expected
schema).
{
description = "Custom themed homepage";
inputs = {
colors.url = "github:myUsername/colors"; # your own color flake
home = {
url = "github:sotormd/homepage";
inputs.colors.follows = "colors";
};
};
outputs = { self, home, colors, ... }: {
packages.x86_64-linux.default =
let
layout = [
[
{ short = "yt"; full = "youtube"; url = "https://youtube.com"; }
{ short = "gh"; full = "github"; url = "https://github.com"; }
]
];
html = home.lib.makeHomepage {
inherit layout;
n = 4;
};
in
builtins.toFile "homepage.html" html;
};
}Each layout element can be one of:
| Type | Description | Example |
|---|---|---|
| List of links | A row of link boxes | [ { short = "yt"; full = "youtube"; url = "https://youtube.com"; } ... ] |
| "separator" | Horizontal line between rows | "separator" |
Each link entry looks like:
{ short = "yt"; full = "youtube"; url = "https://youtube.com"; }| Output | Description |
|---|---|
lib.makeHomepage |
Function that generates static HTML |
packages.<system>.default |
Example homepage (nix build .) |
Each link can be opened by typing its short name directly in the browser.
For example, in the provided example package:
yt → opens YouTube
gh → opens GitHub
