47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{
|
|
description = "NixOS definitions for our physical servers";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
agenix = {
|
|
url = "github:ryantm/agenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
dns = {
|
|
url = "github:kirelagin/dns.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
microvm = {
|
|
url = "github:astro/microvm.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ self, nixpkgs, deploy-rs, disko, agenix, dns, microvm, nixos-hardware, flake-utils, ... }:
|
|
let
|
|
hostSystem = "x86_64-linux";
|
|
hostPkgs = import nixpkgs { system = hostSystem; };
|
|
machines = (hostPkgs.lib.modules.evalModules { modules = [ (import ./nixos/machines) ]; }).config.machines;
|
|
physicalMachines = hostPkgs.lib.filterAttrs (n: v: v.isPhysical) machines;
|
|
in
|
|
flake-utils.lib.meld (inputs // { inherit hostPkgs machines physicalMachines; }) [
|
|
./nixos/flake/bootstrap
|
|
./nixos/flake/checks.nix
|
|
./nixos/flake/deploy.nix
|
|
./nixos/flake/nixos.nix
|
|
] // (flake-utils.lib.eachDefaultSystem (system: {
|
|
formatter = nixpkgs.legacyPackages.${system}.nixfmt;
|
|
}));
|
|
}
|