propellor

propellor config for hosts.
git clone git://git.ricketyspace.net/propellor.git
Log | Files | Refs | LICENSE

commit 078280e4dbe7195ce44cfae582ec238ce3dffe0f
parent 6ad21796a1bd06481a731eecc387ff3f3114412d
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 20 Oct 2018 19:28:28 -0400

propellor spin

Diffstat:
config.hs | 54+++++++++++++-----------------------------------------
1 file changed, 13 insertions(+), 41 deletions(-)

diff --git a/config.hs b/config.hs @@ -588,7 +588,7 @@ ara :: Host ara = host "ara.ricketyspace.net" $props & osDebian Testing X86_64 & Locale.available "en_US.UTF-8" - & ipv4 "142.93.207.215" + & ipv4 "167.99.10.82" & File.hasContent "/etc/motd" (["At ara."]) -- apt & Apt.stdSourcesList @@ -600,6 +600,7 @@ ara = host "ara.ricketyspace.net" $props , "gcc", "gdb", "pkg-config" , "exuberant-ctags", "make" , "wget", "xz-utils", "netbase" + , "gnupg2" ] -- sshd & Ssh.passwordAuthentication False @@ -618,6 +619,8 @@ ara = host "ara.ricketyspace.net" $props (User "s") hostContext (SshRsa, sAraSshPubKey) & File.hasContent "/home/s/.tmux.conf" tmuxConf & File.ownerGroup "/home/s" (User "s") (Group "s") + & File.containsLine "/home/s/.bashrc" + "export GUIX_LOCPATH=$HOME/.guix-profile/lib/locale" -- nginx & Nginx.siteEnabled "ara.ricketyspace.net" araNginx & File.dirExists "/home/s/pub" @@ -634,47 +637,16 @@ ara = host "ara.ricketyspace.net" $props installGuix :: [File.Line] -installGuix = ["#!/bin/sh" - , "" +installGuix = [ + "#!/bin/sh" , "[ -d \"/gnu\" ] && exit 0" - , "" - , "echo 'Installing guix...'" - , "FILE='guix-binary-0.15.0.x86_64-linux.tar.xz'" - , "cd /tmp \\" - , " && wget https://alpha.gnu.org/gnu/guix/$FILE \\" - , " && tar --warning=no-timestamp -xf $FILE \\" - , " && mv var/guix /var/ && mv gnu / \\" - , " && ln -sf /var/guix/profiles/per-user/root/guix-profile /root/.guix-profile" - , "" - , "groupadd --system guixbuild" - , "" - , "for i in `seq -w 1 10`;" - , " do" - , " useradd -g guixbuild -G guixbuild \\" - , " -d /var/empty -s `which nologin` \\" - , " -c \"Guix build user $i\" --system \\" - , " guixbuilder$i;" - , " done" - , "" - , "export GUIX_PROFILE=$HOME/.guix-profile && \\" - , " . $GUIX_PROFILE/etc/profile && \\" - , " guix archive \\" - , " --authorize < /root/.guix-profile/share/guix/hydra.gnu.org.pub" - , "" - , "BASHRC=/root/.bashrc && \\" - , " echo 'GUIX_LOCPATH=\"/root/.guix-profile/lib/locale\"' >> $BASHRC && \\" - , " echo 'export GUIX_PROFILE=\"/root/.guix-profile\"' >> $BASHRC && \\" - , " echo '. /root/.guix-profile/etc/profile' >> $BASHRC" - , "" - , "cp /root/.guix-profile/lib/systemd/system/guix-daemon.service \\" - , " /etc/systemd/system/ && \\" - , " systemctl start guix-daemon && systemctl enable guix-daemon" - , "" - , "mkdir -p /usr/local/bin && \\" - , "ln -sf /var/guix/profiles/per-user/root/guix-profile/bin/guix /usr/local/bin/guix" - , "" - , "INSTALL_DATE=`date` && echo $INSTALL_DATE > /root/.guix_installed" - ] + , "gpg --keyserver pgp.mit.edu --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5 &&" + , " wget https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh \\" + , " -O /tmp/guix-install.sh && \\" + , " chmod +x /tmp/guix-install.sh && \\" + , " /tmp/guix-install.sh" + , "rm -f /tmp/guix-install.sh" + ] araNginx :: [String]