mirror of
https://github.com/srid/nixos-config.git
synced 2026-07-16 22:01:33 +08:00
Phase 1 of the incus-pet design. Adds the deployment infrastructure under modules/nixos/linux/incus/ — a CLI, a container-essentials NixOS module, a SKILL.md for agent-driven adoption — and deletes the webapps/ tree (nspawn-based, weaker isolation defaults, no live consumers). Pairs with srid/anywhen#15 (nixosModules.incus on the anywhen flake) for end-to-end deployment of anywhen as an incus container. Surface added: - modules/nixos/linux/incus/container.nix container essentials (sshd, hostname, flakes, firewall, base packages); imported by the marshaling flake incus-pet generates per app - modules/nixos/linux/incus/incus-pet/ CLI tree: default.nix writeShellApplication; subcommands deploy/list/rm SKILL.md 3-branch agent recipe (deploy / wrapper / add contract upstream) README.md human docs with the full network-model section - modules/flake-parts/incus-pet.nix exposes packages.incus-pet Surface removed: - modules/nixos/linux/anywhen.nix anywhen runs as a container now, not as a host-installed service - configurations/nixos/pureintent drops the anywhen import and the services.anywhen.host wiring - webapps/ deleted entirely Port convention: every containerized service binds 8080 inside its own netns. The host-side <listen-ip>:<host-port> is unique per app, chosen at first deploy via --port + --listen (or INCUS_PET_LISTEN env), and recorded in container metadata so re-deploys are flagless. Run: nix run .#incus-pet -- deploy github:srid/anywhen \ --port 7700 --listen 100.122.32.106 See modules/nixos/linux/incus/incus-pet/README.md for the operator flow and the network model in full.
84 lines
3.2 KiB
Nix
84 lines
3.2 KiB
Nix
{
|
|
description = "Srid's NixOS / nix-darwin configuration";
|
|
|
|
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
# Principle inputs
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nix-darwin.url = "github:LnL7/nix-darwin/master";
|
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
nixos-unified.url = "github:srid/nixos-unified";
|
|
disko.url = "github:nix-community/disko";
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs = {
|
|
darwin.follows = "nix-darwin";
|
|
home-manager.follows = "home-manager";
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
# Software inputs
|
|
github-nix-ci.url = "github:juspay/github-nix-ci";
|
|
nixos-vscode-server.flake = false;
|
|
nixos-vscode-server.url = "github:nix-community/nixos-vscode-server";
|
|
nix-index-database.url = "github:nix-community/nix-index-database";
|
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
|
zmx.url = "github:neurosnap/zmx";
|
|
# vira.url = "github:juspay/vira/github";
|
|
vira.url = "github:juspay/vira";
|
|
# landrun-nix.url = "github:srid/landrun-nix";
|
|
landrun-nix.url = "github:adrian-gierakowski/landrun-nix/darwin-implementation-via-sandbox-exec";
|
|
jumphost-nix.url = "github:srid/jumphost-nix";
|
|
jumphost-nix.flake = false;
|
|
|
|
# KOLU
|
|
kolu.url = "github:juspay/kolu/feat/dock-activity-window";
|
|
|
|
# anywhen — personal task manager. The `incus-contract` branch
|
|
# (srid/anywhen#15) stacks on `abject-turn` (#2) and adds
|
|
# nixosModules.incus, which the incus-pet CLI
|
|
# (modules/nixos/linux/incus/incus-pet) consumes.
|
|
anywhen.url = "github:srid/anywhen/incus-contract";
|
|
|
|
project-unknown.url = "github:juspay/project-unknown";
|
|
project-unknown.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# claude-code 2.1.98 (newer versions are nerfed)
|
|
# See: https://x.com/Sthiven_R/status/2043992488109899849
|
|
llm-agents.url = "github:numtide/llm-agents.nix/d9583b68fdc553936b35dc6ca206d8d8dd552e5b";
|
|
llm-agents.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# Emanote & Imako
|
|
emanote.url = "github:srid/emanote";
|
|
imako.url = "github:srid/imako";
|
|
disc-scrape.url = "github:srid/disc-scrape";
|
|
|
|
# Devshell
|
|
git-hooks.url = "github:cachix/git-hooks.nix";
|
|
git-hooks.flake = false;
|
|
};
|
|
|
|
outputs = inputs@{ self, ... }:
|
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
|
|
imports = (with builtins;
|
|
map
|
|
(fn: ./modules/flake-parts/${fn})
|
|
(attrNames (readDir ./modules/flake-parts)));
|
|
|
|
perSystem = { lib, system, ... }: {
|
|
# Make our overlay available to the devShell
|
|
# "Flake parts does not yet come with an endorsed module that initializes the pkgs argument.""
|
|
# So we must do this manually; https://flake.parts/overlays#consuming-an-overlay
|
|
_module.args.pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
overlays = lib.attrValues self.overlays;
|
|
config.allowUnfree = true;
|
|
};
|
|
};
|
|
};
|
|
}
|