refactor(core): convert the bid module to configz
This commit is contained in:
parent
4742f38122
commit
7e7429a70d
4 changed files with 4 additions and 21 deletions
|
|
@ -1,3 +1,4 @@
|
|||
require "modules.bin"
|
||||
require "modules.clojure"
|
||||
require "modules.lua-lsp"
|
||||
require "modules.nvim"
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ node default {
|
|||
# Set up core components
|
||||
#
|
||||
include core::git
|
||||
include core::zsh
|
||||
include core::bin
|
||||
include core::fonts
|
||||
include core::emacs
|
||||
include core::terminal
|
||||
|
|
|
|||
3
modules/bin.lua
Normal file
3
modules/bin.lua
Normal 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"))
|
||||
|
|
@ -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/",
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue