Files
dotfiles/flake.nix
alexion 358babc629 Configure Neovim via nixvim with Nix-managed plugins (task 0007)
Add an nvim Module that configures Neovim declaratively through nixvim,
wired as a flake input and consumed as its home-manager module. Options,
globals, keymaps, and plugin settings are typed Nix; the colorscheme
call and two autocmds live in modules/nvim/config.lua via extraConfigLua.
Plugins come from nixpkgs (no plugin manager, no runtime cloning); git,
ripgrep, and fd are provided from Nix; treesitter grammars are built by
Nix so no runtime compiler is needed.

Functionally matches the previous config (plugins, keymaps, options, the
nord colorscheme, markdown conceal, the Neogit blame toggle), verified
headless against the generated init.
2026-07-19 07:57:43 -04:00

57 lines
1.9 KiB
Nix

{
description = "Alexion's NixOS configuration one flake for every Host";
inputs = {
# Base channel: nixos-unstable (rolling, but gated by the NixOS test suite).
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Fresher-than-base packages, reachable per-package as `unstable.<name>`.
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
# Latest stable release, reachable per-package as `stable.<name>`.
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Neovim configured declaratively in Nix. Must follow our nixpkgs so its
# plugins build against the same package set.
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
# Declarative disk partitioning. Each Host declares its own layout; a Host
# that preserves an existing pool simply declares none.
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# CachyOS kernel + binary cache. Deliberately NOT following our nixpkgs, so the
# chaotic cache stays usable and the kernel is fetched rather than compiled.
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
};
outputs =
{ self, nixpkgs, ... }@inputs:
let
inherit (nixpkgs) lib;
my = import ./lib { inherit lib inputs self; };
in
{
# The trimmed helper lib: the Auto-loader, the host-builder, the script-from-file helper.
lib = my;
# Every Host under hosts/ is auto-discovered and built.
nixosConfigurations = my.mkHosts (self + "/hosts");
# `nix flake check` builds each Host's toplevel — the primary test seam.
checks.x86_64-linux = lib.mapAttrs (
_name: host: host.config.system.build.toplevel
) self.nixosConfigurations;
};
}