59 lines
1.5 KiB
Nix
59 lines
1.5 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
|
|
disko.url = "github:nix-community/disko";
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
srvos.url = "github:numtide/srvos";
|
|
srvos.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
sops-nix.inputs.nixpkgs-stable.follows = "";
|
|
};
|
|
|
|
outputs = inputs@{ flake-parts, nixpkgs, ... }:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
imports = [
|
|
./targets/flake-module.nix
|
|
./modules/flake-module.nix
|
|
];
|
|
perSystem = { system, pkgs, ... }:
|
|
let
|
|
tofuPkg = pkgs.opentofu.withPlugins (p: [
|
|
pkgs.terraform-providers.hcloud
|
|
pkgs.terraform-providers.null
|
|
pkgs.terraform-providers.external
|
|
pkgs.terraform-providers.local
|
|
pkgs.terraform-providers.cloudflare
|
|
]);
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = [
|
|
tofuPkg
|
|
pkgs.terraform-ls
|
|
pkgs.hcloud
|
|
pkgs.age
|
|
pkgs.sops
|
|
pkgs.direnv
|
|
pkgs.just
|
|
];
|
|
|
|
shellHook = ''
|
|
set -a
|
|
source ./.env
|
|
set +a
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|