2023-12-06 17:10:44 +00:00
|
|
|
#!/usr/local/env bash
|
2023-12-12 11:20:30 +00:00
|
|
|
sudo xbps-install -SuA nscd wget curl brightnessctl pam_rundir seatd polkit mdevd mesa-dri
|
2023-12-06 21:23:52 +00:00
|
|
|
sudo ln -sf /etc/sv/nscd /var/service/
|
|
|
|
sudo bash <<< curl https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
|
2023-12-06 17:10:44 +00:00
|
|
|
|
2023-12-12 11:20:30 +00:00
|
|
|
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
|
2023-12-06 17:10:44 +00:00
|
|
|
sudo mkdir -p /etc/sv/guix-daemon/log
|
|
|
|
sudo 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
|
|
|
|
sudo chmod +x /etc/sv/guix-daemon/run
|
|
|
|
|
|
|
|
sudo cat <<EOF > /etc/sv/guix-daemon/log/run
|
|
|
|
#!/bin/sh
|
|
|
|
exec vlogger -t guix-daemon -p daemon
|
|
|
|
EOF
|
|
|
|
sudo chmod +x /etc/sv/guix-daemon/log/run
|
|
|
|
|
|
|
|
sudo ln -sf /etc/sv/guix-daemon /var/service/
|
|
|
|
|
2023-12-12 11:20:30 +00:00
|
|
|
# Shepherd Daemon
|
|
|
|
sudo mkdir -p /etc/sv/shepherd/log
|
|
|
|
sudo cat <<EOF > /etv/sv/shepherd/run
|
|
|
|
#!/bin/sh
|
|
|
|
exec 2>&1
|
|
|
|
exec $(which shepherd)
|
|
|
|
EOF
|
|
|
|
sudo chmod +x /etc/sv/shepherd/run
|
|
|
|
|
|
|
|
sudo cat <<EOF > /etc/sv/shepherd/log/run
|
|
|
|
#!/bin/sh
|
|
|
|
exec vlogger -t shepherd -p daemon
|
|
|
|
EOF
|
|
|
|
sudo chmod +x /etc/sv/shepherd/log/run
|
|
|
|
|
|
|
|
sudo ln -sf /etc/sv/shepherd /var/service/
|
|
|
|
|
|
|
|
# Enable Daemons
|
|
|
|
|
|
|
|
for DAEMON in guix-daemon shepherd NetworkManager acpid dbus nscd polkitd seatd mdevd
|
|
|
|
|
|
|
|
# Profile Initialization
|
2023-12-06 17:10:44 +00:00
|
|
|
sudo cat <<'EOF' >> ~/.profile
|
|
|
|
GUIX_PROFILE="/home/zilti/.config/guix/current"
|
|
|
|
. "$GUIX_PROFILE/etc/profile"
|
|
|
|
EOF
|
|
|
|
|
|
|
|
guix pull
|
2023-12-12 11:21:08 +00:00
|
|
|
guix home reconfigure ./home/home-configuration.scm
|