refactor(core): convert the bid module to configz

This commit is contained in:
Ade Attwood 2023-11-25 12:07:11 +00:00
parent 4742f38122
commit 7e7429a70d
4 changed files with 4 additions and 21 deletions

View file

@ -1,3 +1,4 @@
require "modules.bin"
require "modules.clojure" require "modules.clojure"
require "modules.lua-lsp" require "modules.lua-lsp"
require "modules.nvim" require "modules.nvim"

View file

@ -16,8 +16,6 @@ node default {
# Set up core components # Set up core components
# #
include core::git include core::git
include core::zsh
include core::bin
include core::fonts include core::fonts
include core::emacs include core::emacs
include core::terminal include core::terminal

3
modules/bin.lua Normal file
View file

@ -0,0 +1,3 @@
-- Links all of the bin files into `~/.local/bin`
configz.directory(os.getenv("HOME") .. "/.local/bin")
configz.run(string.format("ln -sf %s/site-modules/core/files/bin/* %s/.local/bin", os.getenv "PWD", os.getenv "HOME"))

View file

@ -1,19 +0,0 @@
#
# Links all of the bin files into `~/.local/bin`
#
# Author Ade Attwood <code@adeattwood.co.uk>
# Updated 2018-07-16
#
class core::bin {
file { "${user_home}/.local/bin":
ensure => 'directory',
owner => $user,
}
exec { 'Link bin files':
path => '/usr/bin:/usr/sbin:/bin',
command => "mkdir -p ${user_home}/.local/bin \
&& ln -sf ${find_file('core/bin')}/* ${user_home}/.local/bin/",
}
}