feat: implement package post install script
This commit is contained in:
parent
be524472a9
commit
dfc2b448cf
4 changed files with 14 additions and 10 deletions
3
instalee
3
instalee
|
@ -6,7 +6,7 @@ self="$(realpath "$0")"
|
|||
|
||||
globalconfigdir=/etc/xdg
|
||||
case "$XDG_CONFIG_DIRS" in
|
||||
(""|*$configdir*);;
|
||||
(""|*$globalconfigdir*);;
|
||||
(*) globalconfigdir=$(echo $XDG_CONFIG_DIRS | cut -d: -f1);;
|
||||
esac
|
||||
|
||||
|
@ -88,6 +88,7 @@ installpkg() {
|
|||
fi
|
||||
destress " $pkg_entry"
|
||||
$pkg_entry
|
||||
find ${dir_package} -name "post" -o -name "post_${base}" -exec {} \; | sed 's/^/ /'
|
||||
)
|
||||
set +e
|
||||
break
|
||||
|
|
0
packages/nix/arch
Normal file
0
packages/nix/arch
Normal file
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh -e
|
||||
# See https://wiki.archlinux.org/title/Nix
|
||||
sudo usermod -aG nix-users $USER
|
||||
nix-env --install
|
||||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
|
||||
nix-channel --update
|
||||
test -f /etc/nix/nix.conf || echo "max-jobs = auto
|
||||
trusted-users = root $USER" | sudo dd of=/etc/nix/nix.conf status=none
|
||||
sudo systemctl enable --now nix-daemon
|
12
packages/nix/post_arch
Executable file
12
packages/nix/post_arch
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/sh -ex
|
||||
# See https://wiki.archlinux.org/title/Nix
|
||||
sudo usermod -aG nix-users $USER
|
||||
sudo chown -R root:nix-users /nix
|
||||
sudo chmod g+w /nix
|
||||
sudo -u janek sh -c '
|
||||
nix-env --install
|
||||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
|
||||
nix-channel --update'
|
||||
test -f /etc/nix/nix.conf || echo "max-jobs = auto
|
||||
trusted-users = root $USER" | sudo dd of=/etc/nix/nix.conf status=none
|
||||
sudo systemctl enable --now nix-daemon
|
Loading…
Add table
Reference in a new issue