Files
nixos-core/flake.nix
T
kiskaadee 55933afa17 feat(appctl): scaffold strongly-typed v2 metadata engine
Introduce appctl_engine-v2.py as a parallel implementation to begin
replacing the procedural dictionary-based orchestrator with a formalized
dataclass domain model (SitesApp, CoreService).

- Replace brittle custom YAML parser with standard PyYAML safe_load
- Add pyyaml to system packages in nixos/configuration.nix
- Update flake.nix devShell with pyyaml, pyright, and pytest for testing
- Add .direnv and .envrc to .gitignore for local workspace configurations
2026-09-18 12:05:21 -05:00

62 lines
1.4 KiB
Nix

{
description = "Homelab Core — Turnkey Declarative NixOS Appliance for roadtotech.me";
inputs = {
nixpkgs.url = "https://channels.nixos.org/nixos-unstable/nixexprs.tar.zst";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, sops-nix, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations.server = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./nixos/configuration.nix
sops-nix.nixosModules.sops
];
};
devShells.${system}.default = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages (ps: with ps; [
pyyaml
types-pyyaml
pytest
]))
pyright
ruff
];
shellHook = ''
git config core.hooksPath .githooks 2>/dev/null || true
'';
};
checks.${system} = {
test-suite = pkgs.runCommand "core-tests" {
nativeBuildInputs = with pkgs; [
python3
python3Packages.pytest
python3Packages.pyyaml
ruff
];
} ''
mkdir -p $out
cp -r ${self} source
chmod -R u+w source
cd source
HOME=/tmp ruff check --no-cache .
HOME=/tmp pytest -o cache_dir=/tmp/.pytest_cache tests/
'';
};
};
}