2023-05-10 21:05:10 +02:00
|
|
|
{
|
|
|
|
description = "Dependencies to deploy a nixos-wiki";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
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";
|
2023-05-14 18:18:49 +02:00
|
|
|
|
2023-05-14 20:41:19 +02:00
|
|
|
disko.url = "github:nix-community/disko";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2023-05-14 18:18:49 +02: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-05-10 21:05:10 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ flake-parts, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
|
|
|
|
systems = lib.systems.flakeExposed;
|
|
|
|
imports = [
|
|
|
|
inputs.treefmt-nix.flakeModule
|
2023-05-14 18:43:08 +02:00
|
|
|
./targets/flake-module.nix
|
|
|
|
./modules/flake-module.nix
|
2023-05-10 21:05:10 +02:00
|
|
|
];
|
|
|
|
perSystem = { config, pkgs, ... }: {
|
|
|
|
treefmt = {
|
|
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs.terraform.enable = true;
|
|
|
|
programs.nixpkgs-fmt.enable = true;
|
|
|
|
};
|
|
|
|
packages.default = pkgs.mkShell {
|
|
|
|
packages = [
|
|
|
|
pkgs.bashInteractive
|
|
|
|
(pkgs.terraform.withPlugins (p: [
|
|
|
|
p.netlify
|
|
|
|
p.hcloud
|
2023-05-10 21:39:43 +02:00
|
|
|
p.null
|
|
|
|
p.external
|
|
|
|
p.local
|
2023-05-10 21:05:10 +02:00
|
|
|
]))
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|