63 lines
1.9 KiB
Nix
63 lines
1.9 KiB
Nix
{
|
|
description = "CCCHH Nix Infrastructure";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
# Add nixos-generators as an input.
|
|
# See here: https://github.com/nix-community/nixos-generators#using-in-a-flake
|
|
nixos-generators = {
|
|
url = "github:nix-community/nixos-generators";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { nixpkgs, nixpkgs-unstable, nixos-generators, ... }:
|
|
let
|
|
# Shairport Sync with metadata and MQTT support.
|
|
shairportSyncExtendedNixpkgsUnstableOverlay = final: prev: {
|
|
shairport-sync = (prev.shairport-sync.override { enableMetadata = true; }).overrideAttrs (finalAttr: previousAttr: {
|
|
# See: https://github.com/mikebrady/shairport-sync/blob/e78a88b64adfe7b5f88fd6faedf55c57445bb240/CONFIGURATION%20FLAGS.md
|
|
configureFlags = previousAttr.configureFlags ++ [ "--with-mqtt-client" ];
|
|
buildInputs = previousAttr.buildInputs ++ [ final.mosquitto ];
|
|
});
|
|
};
|
|
in {
|
|
colmena = {
|
|
meta = {
|
|
nixpkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
nodeNixpkgs = {
|
|
audio = nixpkgs-unstable.legacyPackages."x86_64-linux".extend shairportSyncExtendedNixpkgsUnstableOverlay;
|
|
};
|
|
};
|
|
|
|
audio = {
|
|
deployment = {
|
|
targetHost = "audio.z9.ccchh.net";
|
|
targetPort = 22;
|
|
targetUser = "colmena-deploy";
|
|
tags = "thinkcccluster";
|
|
};
|
|
imports = [
|
|
./config/common
|
|
./config/proxmox-vm
|
|
./config/hosts/audio
|
|
];
|
|
};
|
|
};
|
|
|
|
packages.x86_64-linux = {
|
|
proxmox-nixos-template = nixos-generators.nixosGenerate {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./config/nixos-generators/proxmox.nix
|
|
./config/common
|
|
./config/proxmox-vm
|
|
];
|
|
format = "proxmox";
|
|
};
|
|
};
|
|
};
|
|
}
|