flowback-infra/flake.nix
2026-03-03 11:21:32 +01:00

53 lines
1.3 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
description = "Flowback infra (NixOS): Nextcloud + Forgejo, staging + production";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# Optional, but strongly recommended for secrets:
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, sops-nix, ... }:
let
mkHost = { name, system, modules }:
nixpkgs.lib.nixosSystem {
inherit system;
modules =
modules ++ [
sops-nix.nixosModules.sops
];
specialArgs = { inherit name; };
};
in
{
# Staging host (x86_64 for VM/cloud)
nixosConfigurations.staging = mkHost {
name = "staging";
system = "x86_64-linux";
modules = [
./hosts/staging/configuration.nix
];
};
# Production host (x86_64 for VM/cloud)
nixosConfigurations.production = mkHost {
name = "production";
system = "x86_64-linux";
modules = [
./hosts/production/configuration.nix
];
};
# Raspberry Pi example (aarch64) — use when youre ready
# nixosConfigurations.rpi-staging = mkHost {
# name = "rpi-staging";
# system = "aarch64-linux";
# modules = [
# ./hosts/staging/configuration.nix
# ./hosts/staging/rpi-hardware.nix
# ];
# };
};
}