2023-12-08 19:07:54 +00:00
|
|
|
{
|
|
|
|
description = "Colmena hive configuration.";
|
|
|
|
|
|
|
|
inputs = {
|
2023-12-23 21:17:37 +00:00
|
|
|
nixpkgs-23_11 = {
|
|
|
|
url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
|
|
};
|
|
|
|
home-manager-23_11 = {
|
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-23_11";
|
2023-12-10 22:15:42 +00:00
|
|
|
};
|
|
|
|
sops-nix-23_11 = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-23_11";
|
|
|
|
};
|
2023-12-08 19:07:54 +00:00
|
|
|
};
|
|
|
|
|
2023-12-23 21:17:37 +00:00
|
|
|
outputs = { nixpkgs-23_11, home-manager-23_11, sops-nix-23_11, ... }:
|
2023-12-08 19:07:54 +00:00
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
2023-12-10 22:15:42 +00:00
|
|
|
tapir = {
|
|
|
|
stateVersion = "23.11";
|
|
|
|
pkgs = import nixpkgs-23_11 { inherit system; };
|
2023-12-23 21:17:37 +00:00
|
|
|
home-manager = home-manager-23_11;
|
2023-12-10 22:15:42 +00:00
|
|
|
sops-nix = sops-nix-23_11;
|
|
|
|
};
|
2023-12-08 19:07:54 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
colmena = {
|
|
|
|
meta = {
|
2023-12-23 21:17:37 +00:00
|
|
|
nixpkgs = tapir.pkgs;
|
2023-12-08 19:07:54 +00:00
|
|
|
specialArgs = { inherit system; };
|
2023-12-10 22:15:42 +00:00
|
|
|
nodeNixpkgs = {
|
2023-12-23 21:17:37 +00:00
|
|
|
framework = tapir.pkgs;
|
2023-12-23 21:07:35 +00:00
|
|
|
deimos = tapir.pkgs;
|
2024-01-22 23:47:19 +00:00
|
|
|
phobos = tapir.pkgs;
|
2024-01-10 16:28:31 +00:00
|
|
|
thebe = tapir.pkgs;
|
2023-12-10 22:15:42 +00:00
|
|
|
};
|
2023-12-10 18:58:13 +00:00
|
|
|
nodeSpecialArgs = {
|
2023-12-10 22:15:42 +00:00
|
|
|
framework = {
|
2023-12-23 21:17:37 +00:00
|
|
|
inherit (tapir) home-manager;
|
|
|
|
};
|
|
|
|
deimos = {
|
|
|
|
inherit (tapir) sops-nix;
|
2023-12-14 15:37:43 +00:00
|
|
|
};
|
2024-01-22 23:47:19 +00:00
|
|
|
phobos = {
|
|
|
|
inherit (tapir) home-manager;
|
|
|
|
};
|
2024-01-10 16:28:31 +00:00
|
|
|
thebe = {
|
2024-01-10 17:45:12 +00:00
|
|
|
inherit (tapir) sops-nix;
|
2024-01-10 16:28:31 +00:00
|
|
|
};
|
2023-12-10 18:58:13 +00:00
|
|
|
};
|
2023-12-08 19:07:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Local machines. Deploy using `colmena apply-local [--sudo]`
|
|
|
|
|
|
|
|
framework = {
|
2023-12-10 22:15:42 +00:00
|
|
|
imports = [ ./hive/framework ];
|
2023-12-08 19:07:54 +00:00
|
|
|
deployment = {
|
|
|
|
allowLocalDeployment = true;
|
|
|
|
targetHost = null; # Disable SSH deployment.
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Remote machines. Deploy using `colmena apply`
|
|
|
|
|
2023-12-14 15:37:43 +00:00
|
|
|
deimos.imports = [ ./hive/deimos ];
|
2024-01-22 23:47:19 +00:00
|
|
|
phobos.imports = [ ./hive/phobos ];
|
2024-01-10 16:28:31 +00:00
|
|
|
thebe.imports = [ ./hive/thebe ];
|
2023-12-10 22:15:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
packages.${system}.digital-ocean = {
|
|
|
|
tapir = import ./digital-ocean {
|
2023-12-23 21:17:37 +00:00
|
|
|
inherit (tapir) pkgs stateVersion;
|
2023-12-10 22:15:42 +00:00
|
|
|
};
|
2023-12-08 19:07:54 +00:00
|
|
|
};
|
2023-12-12 16:07:30 +00:00
|
|
|
|
|
|
|
devShells.${system}.default =
|
|
|
|
let
|
2023-12-23 21:17:37 +00:00
|
|
|
pkgs = tapir.pkgs;
|
2023-12-12 16:07:30 +00:00
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
|
|
|
packages = with pkgs; [ ssh-to-age sops ];
|
|
|
|
};
|
2023-12-08 19:07:54 +00:00
|
|
|
};
|
|
|
|
}
|