forked from Fediversity/Fediversity
intended to swap out nixos-anywhere for terraform-nixos, over: - don't need nixos-anywhere to install nixos; we preload nixos to VMs - [awkward non-flake usage](https://nix-community.github.io/nixos-anywhere/howtos/use-without-flakes.html#3-set-nixos-version-to-use) - seemed not to pick up on config changes, as observed by test VMs losing their panel keys after TF sync however, it seems that terraform-nixos has its own flaws: - its output using a random id, i.e. forcing to push even on no changes - so far did not get ssh authentication to work
31 lines
630 B
Nix
31 lines
630 B
Nix
{
|
|
system ? builtins.currentSystem,
|
|
sources ? import ../npins,
|
|
inputs ? import sources.flake-inputs {
|
|
root = ../.;
|
|
},
|
|
# match the same version of opentofu that is deployed by the root flake
|
|
pkgs ? import inputs.nixpkgs {
|
|
inherit system;
|
|
},
|
|
}:
|
|
let
|
|
inherit (pkgs) lib;
|
|
in
|
|
{
|
|
shell = pkgs.mkShellNoCC {
|
|
packages = [
|
|
pkgs.npins
|
|
pkgs.gnugrep # used in terraform-nixos
|
|
(import ./tf.nix { inherit lib pkgs; })
|
|
];
|
|
};
|
|
|
|
# re-export inputs so they can be overridden granularly
|
|
# (they can't be accessed from the outside any other way)
|
|
inherit
|
|
sources
|
|
system
|
|
pkgs
|
|
;
|
|
}
|