54 lines
1.6 KiB
Nix
54 lines
1.6 KiB
Nix
{
|
|
description = "NixOS definitions for our home servers";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
nixpkgs-unstable.url = "github:pizzapim/nixpkgs/gatus";
|
|
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";
|
|
};
|
|
|
|
kubenix = {
|
|
url = "github:hall/kubenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{ self, nixpkgs, flake-utils, ... }:
|
|
let
|
|
hostSystem = "x86_64-linux";
|
|
hostPkgs = import nixpkgs { system = hostSystem; };
|
|
machines = (hostPkgs.lib.modules.evalModules { modules = [ (import ./nix/machines) ]; }).config.machines;
|
|
physicalMachines = hostPkgs.lib.filterAttrs (n: v: v.isPhysical) machines;
|
|
in
|
|
flake-utils.lib.meld (inputs // { inherit hostPkgs machines physicalMachines; }) [
|
|
./nix/flake/bootstrap
|
|
./nix/flake/checks.nix
|
|
./nix/flake/deploy.nix
|
|
./nix/flake/nixos.nix
|
|
./nix/flake/kubenix.nix
|
|
] // (flake-utils.lib.eachDefaultSystem (system: {
|
|
formatter = nixpkgs.legacyPackages.${system}.nixfmt;
|
|
}));
|
|
}
|