1
0
Fork 0
server-configuration/flake.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

2025-02-21 05:49:05 +00:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2025-02-21 08:27:04 +00:00
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";
2025-02-21 05:49:05 +00:00
};
outputs = { self, nixpkgs, ... }:
let
allSystems = [ "x86_64-linux" "aarch64-linux" ];
in
{
devShells = nixpkgs.lib.genAttrs allSystems (system:
let
pkgs = import nixpkgs { inherit system; };
tofuPkg = pkgs.opentofu.withPlugins (p: [
pkgs.terraform-providers.hcloud
2025-02-21 08:27:04 +00:00
pkgs.terraform-providers.null
pkgs.terraform-providers.external
2025-02-21 05:49:05 +00:00
]);
in {
default = pkgs.mkShell {
buildInputs = [
tofuPkg
pkgs.terraform-ls
];
2025-02-21 07:49:45 +00:00
shellHook = ''
alias tofu-plan="tofu plan -var-file=secret.tfvars"
alias tofu-apply="tofu apply -var-file=secret.tfvars"
'';
2025-02-21 05:49:05 +00:00
};
}
);
};
}