Add dependency management to content silo dir

main
Julius Riegel 9 months ago
parent cecef0d107
commit 606180597d

@ -0,0 +1,35 @@
local silo = require 'silo'
local utils = require 'utils'
local log = require 'log'
local config = {
path = silo.dirs.config,
mode = "exclude",
exclude = {},
}
local function not_installed(program)
return utils.nu ("which "..program.." | is-empty") == "true\n"
end
local function needs(program, glob)
if not_installed(program) then
table.insert(config.exclude, glob)
end
end
needs("broot", "broot")
needs("firecfg", "firejail")
needs("btm", "bottom")
needs("helix", "helix")
needs("home-manager", "home-manager")
needs("nix", "nixpkgs")
needs("nu", "nushell")
needs("systemctl", "systemd")
needs("wezterm", "wezterm")
needs("zellij", "zellij")
needs("starship", "starship")
log.debug(config)
return config

@ -72,6 +72,13 @@ config.modules = {
},
terraform = mod {
'terraform-ls',
},
nix = mod {
'nil',
'nixfmt',
},
aws = mod {
'awscli2'
}
}

Loading…
Cancel
Save