repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
nushell/modules/package/provider.nu
Raw# Provisions a systems by installing/uninstalling packages in provisions.
# Provisions are a collection of nuon files in PACKAGE_HOME/Provsions/*.
# All files there are expected to list manifests.
# They are collected and installed.
# A precedence order for package sources will be enforced:
# packages > native packages > language packages.
# This precedence will be enforced, even if, packages need to be reinstalled.
# It depends on the availablity of packages in their given source.
use ./folders.nu
use ./path.nu
use ./installer.nu
use ./native-package-manager
const INSTALL_ACTION = 'install'
const UNINSTALL_ACTION = 'uninstall'
export def provision [] {
cd (folders manifests)
let manifests = ls | get name | str replace '.nuon' '' | wrap manifest
cd (folders provisions)
let provisions = open **/*.nuon | uniq
# check if installed packages are synced with current manifests
# check if current installed packages are installed via correct source
# install all missing. reinstall all with higher precedence
# uninstall non-provisioned ?
# setup path
}