.
This commit is contained in:
parent
143aea958c
commit
36b5b4eb09
2 changed files with 52 additions and 48 deletions
46
install-guix-on-void-root.bash
Normal file
46
install-guix-on-void-root.bash
Normal file
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env bash
|
||||
xbps-install -SuA wget curl brightnessctl pam_rundir seatd polkit mdevd mesa-dri gnupg2 xz NetworkManager
|
||||
curl -L https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh > guix-install.sh
|
||||
which guix || bash guix-install.sh
|
||||
yes | guix install shepherd
|
||||
|
||||
sed -i '/pam_rundir/{h;s/^.*$/-session optional pam_rundir.so/};${x;/^$/{s//-session optional pam_rundir.so/;H};x}' /etc/pam.d/system-login
|
||||
|
||||
# Guix Daemon
|
||||
mkdir -p /etc/sv/guix-daemon/log
|
||||
cat <<'EOF' > /etc/sv/guix-daemon/run
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild
|
||||
EOF
|
||||
chmod +x /etc/sv/guix-daemon/run
|
||||
|
||||
cat <<EOF > /etc/sv/guix-daemon/log/run
|
||||
#!/bin/sh
|
||||
exec vlogger -t guix-daemon -p daemon
|
||||
EOF
|
||||
chmod +x /etc/sv/guix-daemon/log/run
|
||||
|
||||
# Shepherd Daemon
|
||||
mkdir -p /etc/sv/shepherd/log
|
||||
cat <<EOF > /etc/sv/shepherd/run
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec $(find /gnu -wholename '*/bin/shepherd')
|
||||
EOF
|
||||
chmod +x /etc/sv/shepherd/run
|
||||
|
||||
cat <<EOF > /etc/sv/shepherd/log/run
|
||||
#!/bin/sh
|
||||
exec vlogger -t shepherd -p daemon
|
||||
EOF
|
||||
chmod +x /etc/sv/shepherd/log/run
|
||||
|
||||
# Enable Daemons
|
||||
for DAEMON in guix-daemon shepherd NetworkManager acpid dbus mdevd polkitd seatd mdevd
|
||||
do
|
||||
ln -sf /etc/sv/$DAEMON /var/service/
|
||||
done
|
||||
|
||||
# Add user to groups
|
||||
usermod -a -G seat zilti
|
|
@ -1,55 +1,13 @@
|
|||
#!/usr/local/env bash
|
||||
xbps-install -SuA wget curl brightnessctl pam_rundir seatd polkit mdevd mesa-dri gnupg2 xz
|
||||
ln -sf /etc/sv/nscd /var/service/
|
||||
curl -L https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh > guix-install.sh
|
||||
which guix || bash guix-install.sh
|
||||
guix install shepherd
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sed -i '/pam_rundir/{h;s/^.*$/-session optional pam_rundir.so/};${x;/^$/{s//-session optional pam_rundir.so/;H};x}' /etc/pam.d/system-login
|
||||
|
||||
# Guix Daemon
|
||||
mkdir -p /etc/sv/guix-daemon/log
|
||||
cat <<'EOF' > /etc/sv/guix-daemon/run
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild
|
||||
EOF
|
||||
chmod +x /etc/sv/guix-daemon/run
|
||||
|
||||
cat <<EOF > /etc/sv/guix-daemon/log/run
|
||||
#!/bin/sh
|
||||
exec vlogger -t guix-daemon -p daemon
|
||||
EOF
|
||||
chmod +x /etc/sv/guix-daemon/log/run
|
||||
|
||||
ln -sf /etc/sv/guix-daemon /var/service/
|
||||
|
||||
# Shepherd Daemon
|
||||
mkdir -p /etc/sv/shepherd/log
|
||||
cat <<EOF > /etc/sv/shepherd/run
|
||||
#!/bin/sh
|
||||
exec 2>&1
|
||||
exec $(find /gnu -wholename '*/bin/shepherd')
|
||||
EOF
|
||||
chmod +x /etc/sv/shepherd/run
|
||||
|
||||
cat <<EOF > /etc/sv/shepherd/log/run
|
||||
#!/bin/sh
|
||||
exec vlogger -t shepherd -p daemon
|
||||
EOF
|
||||
chmod +x /etc/sv/shepherd/log/run
|
||||
|
||||
ln -sf /etc/sv/shepherd /var/service/
|
||||
|
||||
# Enable Daemons
|
||||
|
||||
for DAEMON in guix-daemon shepherd NetworkManager acpid dbus nscd polkitd seatd mdevd
|
||||
sudo bash ./install-guix-on-void-root.bash
|
||||
|
||||
# Profile Initialization
|
||||
cat <<'EOF' >> ~/.profile
|
||||
cat << 'EOF' > ~/.profile
|
||||
GUIX_PROFILE="/home/zilti/.config/guix/current"
|
||||
. "$GUIX_PROFILE/etc/profile"
|
||||
EOF
|
||||
|
||||
#guix pull
|
||||
#guix home reconfigure ./home/home-configuration.scm
|
||||
guix pull
|
||||
. ~/.profile
|
||||
guix home reconfigure ./home/home-configuration.scm
|
||||
|
|
Loading…
Reference in a new issue