nixos-servers/flake.nix
Pim Kunis e7d75fbb21 Use nix-snapshotter as k3s' snapshotter and image service
Replace k3s' embedded containerd with Nix-managed one
Deploy test k8s with image from Nix store
2024-06-24 23:31:06 +02:00

64 lines
1.8 KiB
Nix

{
description = "NixOS definitions for our home servers";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
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";
};
dns = {
url = "github:kirelagin/dns.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixhelm = {
url = "github:farcaller/nixhelm";
inputs.nixpkgs.follows = "nixpkgs";
};
blog-pim = {
url = "git+https://git.kun.is/home/blog-pim";
inputs.nixpkgs.follows = "nixpkgs";
};
kubenix = {
url = "github:pizzapim/kubenix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-snapshotter = {
url = "github:pdtpartners/nix-snapshotter";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
outputs =
inputs@{ self, nixpkgs, flake-utils, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
machines = (pkgs.lib.modules.evalModules { modules = [ (import ./machines) ]; }).config.machines;
myLib = import ./my-lib pkgs.lib;
in
flake-utils.lib.meld (inputs // { inherit pkgs machines myLib; }) [
./flake-parts/scripts
./flake-parts/checks.nix
./flake-parts/deploy.nix
./flake-parts/nixos.nix
./flake-parts/kubenix.nix
] // (flake-utils.lib.eachDefaultSystem (system: {
formatter = nixpkgs.legacyPackages.${system}.nixfmt;
}));
}