diff --git a/examples/archlinux-gnome/conf.d/pkgs.sh b/examples/archlinux-gnome/conf.d/basic.sh similarity index 84% rename from examples/archlinux-gnome/conf.d/pkgs.sh rename to examples/archlinux-gnome/conf.d/basic.sh index 362c0ccda39dd076bfb7856dbba941012128d110..380872dcc08c2a74619b95dc9322c8a591cc03d4 100644 --- a/examples/archlinux-gnome/conf.d/pkgs.sh +++ b/examples/archlinux-gnome/conf.d/basic.sh @@ -1,17 +1,19 @@ lc_assert_user_is root lc_init () { - # my favorite package + # my favorite pkgs pacman -Sy --noconfirm fish dhcpcd vim sudo openssh pacman -Sy --noconfirm --asdeps openssl - pacman -Sy --noconfirm gnome networkmanager power-profiles-daemon nextcloud-client firefox - # add primary user useradd --create-home --shell /usr/bin/fish rtest echo 'rtest ALL=(ALL) NOPASSWD: ALL' | EDITOR='tee -a' visudo usermod --password $(echo testpass | openssl passwd -1 -stdin) rtest + sudo -u rtest linuxconf register masterconf.sh + + # more desktop pkgs + pacman -Sy --noconfirm gnome networkmanager power-profiles-daemon nextcloud-client firefox systemctl enable gdm NetworkManager power-profiles-daemon } diff --git a/examples/archlinux-gnome/conf.d/desktop.sh b/examples/archlinux-gnome/conf.d/desktop.sh new file mode 100644 index 0000000000000000000000000000000000000000..5351723b0f583d7f773ce6dff2464b9678fc9d0e --- /dev/null +++ b/examples/archlinux-gnome/conf.d/desktop.sh @@ -0,0 +1,11 @@ +lc_assert_user_is_not root + +lc_init () { + [[ -d $HOME/sh ]] || git clone https://git.recolic.net/root/daily-scripts.git $HOME/sh || return 1 + +} + +lc_startup () { + +} + diff --git a/examples/template/masterconf.sh b/examples/template/masterconf.sh index da8b5aa0f41d8fc15a00707cb0aa983842b4fca6..20fe813813b8a8e0449b56cc3cf5f24a8263e0a0 100644 --- a/examples/template/masterconf.sh +++ b/examples/template/masterconf.sh @@ -46,3 +46,7 @@ function lc_cron () { # Warning: watch out for unintended user lc_fsmap files/vimrc $LC_USER_HOME/.vimrc +# TODO: what if lc_fsmap depends on lc_init() ?? This is not recommended usage. +# e.g: 'git clone xxx $HOME/sh' and lc_fsmap $HOME/sh/something /usr/bin/fancy +# lc_fsmap should success even if $HOME/sh/something doesn't exist yet. (what if dest also not exist? let it fail...) +