nixos-configuration/flake.nix

116 lines
2.8 KiB
Nix
Raw Normal View History

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";
};
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";
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;
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; };
nodeNixpkgs = {
2023-12-23 21:17:37 +00:00
framework = tapir.pkgs;
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 18:58:13 +00:00
nodeSpecialArgs = {
2023-12-23 21:17:37 +00:00
deimos = {
inherit (tapir) sops-nix;
};
framework = {
inherit (tapir) home-manager;
};
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
};
europa = {
inherit (tapir) sops-nix;
};
2023-12-10 18:58:13 +00:00
};
2023-12-08 19:07:54 +00:00
};
deimos = {
imports = [ ./hive/deimos ];
deployment = {
allowLocalDeployment = false;
targetHost = "24.199.110.222";
};
};
2023-12-08 19:07:54 +00:00
framework = {
imports = [ ./hive/framework ];
2023-12-08 19:07:54 +00:00
deployment = {
allowLocalDeployment = true;
targetHost = null;
2023-12-08 19:07:54 +00:00
};
};
phobos = {
2024-04-12 18:28:36 +00:00
# We keep this machine around as an example of how a remote NixOS
# dev machine can be configured.
imports = [ ./hive/phobos ];
deployment = {
2024-04-12 18:28:36 +00:00
allowLocalDeployment = false;
targetHost = null;
};
};
2023-12-08 19:07:54 +00:00
thebe = {
imports = [ ./hive/thebe ];
deployment = {
allowLocalDeployment = false;
targetHost = "64.23.168.148";
};
};
europa = {
imports = [ ./hive/europa ];
deployment = {
allowLocalDeployment = false;
targetHost = "147.182.255.90";
};
};
};
packages.${system}.digital-ocean = {
tapir = import ./digital-ocean {
2023-12-23 21:17:37 +00:00
inherit (tapir) pkgs stateVersion;
};
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
};
}