clan-infra/flake.nix

73 lines
2.3 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-07-04 17:09:37 +00:00
# https://github.com/NixOS/nixpkgs/pull/241526
nixpkgs.url = "github:Mic92/nixpkgs/cloud-init";
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";
homepage.url = "git+https://git.clan.lol/clan/clan-homepage";
homepage.inputs.nixpkgs.follows = "nixpkgs";
homepage.inputs.flake-parts.follows = "flake-parts";
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-13 09:05:07 +00:00
nix.url = "github:/nixos/nix?ref=2.16.1";
nix.inputs.nixpkgs.follows = "nixpkgs";
nix.inputs.nixpkgs-regression.follows = "";
nix.inputs.flake-compat.follows = "";
2023-07-04 14:43:31 +00:00
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
systems = lib.systems.flakeExposed;
imports = [
inputs.treefmt-nix.flakeModule
./targets/flake-module.nix
./modules/flake-module.nix
];
perSystem = { config, pkgs, inputs', ... }: {
treefmt = {
projectRootFile = "flake.nix";
programs.terraform.enable = true;
programs.nixpkgs-fmt.enable = true;
};
2023-07-13 09:05:07 +00:00
packages.actions-runner = pkgs.callPackage ./pkgs/actions-runner.nix {
inherit inputs;
};
packages.gitea = pkgs.callPackage ./pkgs/gitea {};
2023-07-04 14:43:31 +00:00
packages.default = pkgs.mkShell {
packages = [
pkgs.bashInteractive
pkgs.sops
(pkgs.terraform.withPlugins (p: [
p.namecheap
p.netlify
p.hcloud
p.null
p.external
p.local
]))
];
};
};
});
}