nixos-servers/flake.nix
Pim Kunis ea84627e59 feat: Use Attic as binary cache
fix: Improve flake outputs yet again
refactor: Delete dead code related to hamnet
2024-07-27 21:12:24 +02:00

75 lines
2.1 KiB
Nix

{
description = "NixOS definitions for our home servers";
nixConfig = {
extra-substituters = [
"https://attic.kun.is/nixos-servers"
];
extra-trusted-public-keys = [
"nixos-servers:JThtPjQjDu3b3qXLgeXSJGgKL4OKQ4uLgTtoo1rg6Vw="
];
};
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 = {
# HACK: pinning this to a specific revision, as my automation is broken.
url = "git+https://git.kun.is/home/blog-pim?rev=7296f7f5bf5f089a5137036dcbd8058cf3e4a9e5";
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;
}));
}