Added IaC support

This commit is contained in:
Fred Drake
2024-10-10 15:52:36 -04:00
parent 654381910b
commit e349347a95
4 changed files with 71 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
let
# Read all files in the current directory
files = builtins.readDir ./.;
# Filter out default.nix and non-.nix files
nixFiles = builtins.filter
(name: name != "default.nix" && builtins.match ".*\\.nix" name != null)
(builtins.attrNames files);
# Create a list of import statements
imports = map (name: ./. + "/${name}") nixFiles;
in {
# Import all configuration modules automatically
imports = imports;
}
+33
View File
@@ -0,0 +1,33 @@
{pkgs, ...}: {
plugins = {
conform-nvim = {
enable = true;
settings = {
formatters_by_ft = {
terraform = ["tofu_fmt"];
tf = ["tofu_fmt"];
};
};
};
lsp.servers = {
ansiblels.enable = true;
dockerls.enable = true;
helm-ls.enable = true;
nginx-language-server.enable = true;
terraformls.enable = true;
};
};
extraPlugins = [
# Set ansible.yaml files
(pkgs.vimUtils.buildVimPlugin {
name = "nvim-ansible";
src = pkgs.fetchFromGitHub {
owner = "mfussenegger";
repo = "nvim-ansible";
rev = "9c3b4a771b8c8d7b4f2171466464d978cb3846f7";
hash = "sha256-N1yOL77WpP66A2zrKxi7IOO5uRzAaeGa0Y/yWaIFiws=";
};
})
];
}