clan-infra/flake.nix

61 lines
1.9 KiB
Nix
Raw Normal View History

2023-07-04 14:43:31 +00:00
{
description = "Dependencies to deploy a clan";
2023-07-05 15:27:07 +00:00
nixConfig = {
extra-substituters = [ "https://cache.clan.lol" ];
extra-trusted-public-keys = [ "cache.clan.lol-1:j83TYLUVsrSXZvQdMoY+Ms81Xd/nO8GNuQQHqphzRSg=" ];
};
2023-07-04 14:43:31 +00:00
inputs = {
2023-08-22 11:18:39 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-07-04 14:43:31 +00:00
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
2023-07-05 15:19:22 +00:00
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.inputs.nixpkgs-stable.follows = "";
2023-07-04 14:43:31 +00:00
srvos.url = "github:numtide/srvos";
# Use the version of nixpkgs that has been tested to work with SrvOS
srvos.inputs.nixpkgs.follows = "nixpkgs";
2023-07-26 16:29:57 +00:00
clan-core.url = "git+https://git.clan.lol/clan/clan-core";
clan-core.inputs.flake-parts.follows = "flake-parts";
clan-core.inputs.nixpkgs.follows = "nixpkgs";
clan-core.inputs.treefmt-nix.follows = "treefmt-nix";
2023-07-04 14:43:31 +00:00
};
outputs = inputs@{ flake-parts, ... }:
2023-08-08 12:07:41 +00:00
flake-parts.lib.mkFlake { inherit inputs; } {
2023-07-13 09:29:07 +00:00
systems = [
"x86_64-linux"
"aarch64-linux"
];
2023-07-04 14:43:31 +00:00
imports = [
inputs.treefmt-nix.flakeModule
2023-08-03 14:13:22 +00:00
./devShells/flake-module.nix
2023-07-04 14:43:31 +00:00
./targets/flake-module.nix
./modules/flake-module.nix
./pkgs/flake-module.nix
2023-07-04 14:43:31 +00:00
];
2023-08-08 12:07:41 +00:00
perSystem = {
2023-07-04 14:43:31 +00:00
treefmt = {
projectRootFile = "flake.nix";
programs.terraform.enable = true;
programs.nixpkgs-fmt.enable = true;
2023-07-14 13:42:38 +00:00
settings.formatter.nixpkgs-fmt.excludes = [
# generated files
"node-env.nix"
"node-packages.nix"
"composition.nix"
];
2023-07-04 14:43:31 +00:00
};
};
2023-08-08 12:07:41 +00:00
};
2023-07-04 14:43:31 +00:00
}