127 lines
3.7 KiB
Nix
127 lines
3.7 KiB
Nix
{
|
|
description = "alexion.dev";
|
|
|
|
inputs = {
|
|
# Base nixpkgs channel.
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
# Fresher 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";
|
|
};
|
|
|
|
# Signed AMO extensions, pinned by version and hash.
|
|
firefox-addons = {
|
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Follows 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.
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Upstream per-machine hardware profiles.
|
|
# Each host imports its own.
|
|
nixos-hardware = {
|
|
url = "github:NixOS/nixos-hardware";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Decrypts committed secrets at activation, from an age identity on the host.
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Themes the graphical layer from one base16 scheme.
|
|
# Follows our nixpkgs so it themes the same package set the host builds.
|
|
stylix = {
|
|
url = "github:danth/stylix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# TODO: deprecate / remove
|
|
# Agent-ergonomic CLI for Gitea, with a home-manager module for the agent context.
|
|
gitea-axi = {
|
|
url = "git+https://git.alexion.dev/alexion/gitea-axi";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Repository formatter and Nix lint wiring.
|
|
treefmt-nix = {
|
|
url = "github:numtide/treefmt-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# CachyOS kernel and binary cache.
|
|
# This must not follow this flake's nixpkgs because Chaotic builds against its own pinned package set.
|
|
# Its cache serves the kernel only when the overlay stays on the cache-friendly path.
|
|
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
treefmt-nix,
|
|
...
|
|
}@inputs:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
pkgsFor = system: nixpkgs.legacyPackages.${system};
|
|
treefmtEvalFor = system: treefmt-nix.lib.evalModule (pkgsFor system) ./treefmt.nix;
|
|
in
|
|
{
|
|
formatter = forAllSystems (system: (treefmtEvalFor system).config.build.wrapper);
|
|
|
|
apps = forAllSystems (
|
|
system:
|
|
let
|
|
pkgs = pkgsFor system;
|
|
treefmtEval = treefmtEvalFor system;
|
|
nixStyleCheck = pkgs.writeShellApplication {
|
|
name = "nix-style-check";
|
|
runtimeInputs = [
|
|
treefmtEval.config.build.wrapper
|
|
pkgs.statix
|
|
pkgs.deadnix
|
|
];
|
|
text = ''
|
|
treefmt --fail-on-change
|
|
statix check .
|
|
deadnix --fail --no-lambda-pattern-names --no-underscore .
|
|
'';
|
|
};
|
|
in
|
|
{
|
|
nix-style-check = {
|
|
type = "app";
|
|
program = "${nixStyleCheck}/bin/nix-style-check";
|
|
};
|
|
}
|
|
);
|
|
|
|
nixosConfigurations = (import ./src/dotfiles {
|
|
inherit inputs self;
|
|
lib = nixpkgs.lib;
|
|
root = ./configs/nixos;
|
|
}).nixosConfigurations;
|
|
};
|
|
}
|