index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | deployments/00_11_22_33_44_55.json | 20 | ||||
-rw-r--r-- | deployments/08:00:27:36:83:9b.json | 21 | ||||
-rw-r--r-- | deployments/08:00:27:6f:0c:25.json | 29 | ||||
-rw-r--r-- | deployments/08:00:27:e0:e0:e6.json | 31 | ||||
-rw-r--r-- | deployments/default.json | 37 | ||||
-rw-r--r-- | deployments/workstation.json | 35 |
diff --git a/deployments/00_11_22_33_44_55.json b/deployments/00_11_22_33_44_55.json new file mode 100644 index 00000000..5526629e --- /dev/null +++ b/deployments/00_11_22_33_44_55.json @@ -0,0 +1,20 @@ +{ + "args" : { + "include" : "workstation", + "user" : "anton", + "password" : "1111", + "drive" : "/dev/sdb", + "post" : "don't reboot" + }, + "post" : { + "Setup a basic virtual environment": { + "mkdir -p /home/{user}/virts" : {"pass-args" : true}, + "qemu-img create -f qcow2 /home/{user}/virts/test_deploy.qcow2 4G" : {"pass-args" : true}, + "chown -R {user}.{user} /home/{user}/virts" : {"pass-args" : true} + }, + "Setup user" : { + "useradd -m -G wheel -s /bin/bash anton" : null, + "sh -c \"echo {user}:{password} | chpasswd\"" : {"pass-args" : true} + } + } +} diff --git a/deployments/08:00:27:36:83:9b.json b/deployments/08:00:27:36:83:9b.json new file mode 100644 index 00000000..c6e4f698 --- /dev/null +++ b/deployments/08:00:27:36:83:9b.json @@ -0,0 +1,21 @@ +{ + "args" : { + "password" : "0000" + }, + "pre" : { + "sh -c \"echo -n -e '[arch_offline]\nSigLevel = Optional TrustAll\nServer = http://localmirror.lan/archlinux/os/${arch}' >> /etc/pacman.conf\"" : null + }, + "post" : { + "Setup openssh": { + "pacman -Syy --noconfirm openssh" : null + }, + "Setup OpenVPN": { + "pacman -Syy --noconfirm openvpn" : null + }, + "Setup autostarts": { + "systemctl enable dhcpcd" : null, + "systemctl enable openssh" : null, + "systemctl enable openvpn-client@testclient" : null + } + } +} diff --git a/deployments/08:00:27:6f:0c:25.json b/deployments/08:00:27:6f:0c:25.json new file mode 100644 index 00000000..423fe872 --- /dev/null +++ b/deployments/08:00:27:6f:0c:25.json @@ -0,0 +1,29 @@ +{ + "args" : { + "password" : "0000", + "post" : "stay" + }, + "post" : { + "Installing DNS + Database": { + "pacman -Syy --noconfirm powerdns postgresql" : null + }, + "Setup Database": { + "sh -c \"echo 'postgres:{pin}' | chpasswd\"" : null, + "su - postgres -c \"initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'\"" : null, + "systemctl start postgresql" : null, + "su - postgres -c \"psql -c \\\"CREATE USER pdns WITH PASSWORD 'SomePassword';\\\"\"" : {"debug" : true} + }, + "Setup DNS": { + "sh -c \"echo -e 'launch=gpgsql\ngpgsql-host=127.0.0.1\ngpgsql-user=pdns\ngpgsql-dbname=pdns\ngpgsql-password={PIN}' >> /etc/powerdns/pdns.conf\"" : null, + "psql -U pdns -d pdns -a -f /usr/share/doc/powerdns/schema.pgsql.sql" : null + }, + "Install DNS Entries": { + + }, + "Setup autostarts": { + "systemctl enable dhcpcd" : null, + "systemctl enable postgresql" : null, + "systemctl enable powerdns" : null + } + } +} diff --git a/deployments/08:00:27:e0:e0:e6.json b/deployments/08:00:27:e0:e0:e6.json new file mode 100644 index 00000000..79347f8b --- /dev/null +++ b/deployments/08:00:27:e0:e0:e6.json @@ -0,0 +1,31 @@ +{ + "args" : { + "password" : "0001" + }, + "post" : { + "Setup temp build env": { + "pacman -Syy --noconfirm git" : null, + "useradd -m -G wheel builder" : null, + "sed -i 's/# %wheel ALL=(ALL) NO/%wheel ALL=(ALL) NO/' /etc/sudoers" : null + }, + "install lighttpd2-git": { + "git clone https://aur.archlinux.org/lighttpd2-git.git /home/builder/lighttpd2" : null, + "chown -R builder.builder /home/builder/lighttpd2" : null, + "su - builder -c \"(cd /home/builder/lighttpd2/; /usr/bin/makepkg -s --noconfirm)\"" : null, + "sh -c 'pacman -U --noconfirm /home/builder/lighttpd2/*.xz'" : null + }, + "Remove temp build env": { + "rm -rf /home/builder/lighttpd2" : null, + "sed -i 's/%wheel ALL=(ALL) NO/# %wheel ALL=(ALL) NO/' /etc/sudoers" : null + }, + "Create mirror": { + "mkdir -p /srv/http/archlinux/arch_offline/os/x86_64" : null, + "pacman --noconfirm --dbpath /tmp/ -Syu -w --cachedir /srv/http/archlinux/arch_offline/os/x86_64 base base-devel git python python-systemd awesome xorg-xinit xorg-server xterm nano screen sudo iptables mesa-libgl dhclient dnsmasq darkhttpd openssh sshfs openssl openvpn gcc openvpn rtorrent powerdns postgresql" : null, + "sh -c 'repo-add /srv/http/archlinux/arch_offline/os/x86_64/arch_offline.db.tar.gz /srv/http/archlinux/arch_offline/os/x86_64/*.pkg.tar.xz'" : null + }, + "Setup autostarts": { + "systemctl enable dhcpcd" : null, + "systemctl enable lighttpd2" : null + } + } +} diff --git a/deployments/default.json b/deployments/default.json new file mode 100644 index 00000000..c2d34267 --- /dev/null +++ b/deployments/default.json @@ -0,0 +1,37 @@ +{ + "args" : { + "password" : "<STDIN>", + "user" : "anton", + "_webbrowser" : "chromium", + "_window_manager" : "awesome", + "_keyboard_layout" : "sv-latin1" + }, + "post" : { + "Install workstation packages": { + "pacman -Syy --noconfirm {_webbrowser} {_window_manager} openssh sshfs git dhclient ttf-freefont xorg-server xorg-xrandr xorg-xinit xterm nano wget pulseaudio pulseaudio-alsa pavucontrol smbclient cifs-utils xscreensaver" : null + }, + "Enable autostarts": { + "systemctl enable dhcpcd" : null + }, + "Setup desktop environment" : { + "sed -i 's/^twm &/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^xclock/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^xterm/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^exec xterm/#&/' /etc/X11/xinit/xinitrc" : null, + "sh -c \"echo 'setxkbmap se' >> /etc/X11/xinit/xinitrc\"" : null, + "sh -c \"echo 'xscreensaver -no-splash &' >> /etc/X11/xinit/xinitrc\"" : null, + "sh -c \"echo 'exec {_window_manager}' >> /etc/X11/xinit/xinitrc\"" : {"pass-args" : true}, + "sh -c \"echo 'KEYMAP={_keyboard_layout}\nFONT=lat9w-16' >> /etc/vconsole.conf\"" : {"pass-args" : true}, + "sh -c \"sed -i 's/{ \\\"open terminal\\\", terminal/{ \\\"Chromium\\\", \\\"chromium\\\" },\n &1/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"sed -i 's/{ \\\"open terminal\\\", terminal/{ \\\"File handler\\\", \\\"nemo\\\" },\n &1/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"sed -i 's/^globalkeys = gears.table.join(/&\n awful.key({ modkey, }, \\\"l\\\", function() awful.spawn(\\\"xscreensaver-command -lock &\\\") end),\n/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"awk -i inplace -v RS='' '{gsub(/awful.key\\({ modkey,.*?}, \\\"Tab\\\",.*?\\\"client\\\"}\\),/, \\\"awful.key({ modkey, }, \\\"Tab\\\",\\\n function ()\\\n awful.client.focus.byidx(-1)\\\n if client.focus then\\\n client.focus:raise()\\\n end\\\n end),\\\n awful.key({ modkey, \\\"Shift\\\" }, \\\"Tab\\\",\\\n function ()\\\n awful.client.focus.byidx(1)\\\n if client.focus then\\\n client.focus.raise()\\\n end\\\n end),\\\"); print}' /etc/xdg/awesome/rc.lua\"" : null, + "gsettings set org.nemo.desktop show-desktop-icons false" : null, + "xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search" : null + }, + "Setup users" : { + "useradd -m -G wheel -s /bin/bash anton" : null, + "sh -c \"echo {user}:{password} | chpasswd\"" : {"pass-args" : true} + } + } +} diff --git a/deployments/workstation.json b/deployments/workstation.json new file mode 100644 index 00000000..50686193 --- /dev/null +++ b/deployments/workstation.json @@ -0,0 +1,35 @@ +{ + "args" : { + "password" : "<STDIN>", + "_mediaplayer" : "lollypop gstreamer gst-plugins-good gnome-keyring", + "_webbrowser" : "chromium", + "_window_manager" : "awesome", + "_keyboard_layout" : "sv-latin1", + "_virtulization" : "qemu ovmf", + "post" : "don't reboot" + }, + "post" : { + "Install workstation packages": { + "pacman -Syy --noconfirm openssh sshfs git {_webbrowser} {_mediaplayer} {_window_manager} {_virtulization} dhclient ttf-freefont xorg-server xorg-xrandr xorg-xinit xterm nano wget pulseaudio pulseaudio-alsa pavucontrol smbclient cifs-utils xscreensaver" : {"pass-args" : true} + }, + "Setup virtulization" : { + "sh -c \"Description=\\\"Bridge for virtual machines\\\"\nInterface=br0\nConnection=bridge\nBindsToInterfaces=(eno1)\nIP=no\nExecUpPost=\\\"ip link set dev br0 address $(cat /sys/class/net/eno1/address); IP=dhcp; ip_set\\\"\nExecDownPre=\\\"IP=dhcp\\\"\n\n## Ignore (R)STP and immediately activate the bridge\nSkipForwardingDelay=yes\"" : null + }, + "Setup desktop environment" : { + "sed -i 's/^twm &/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^xclock/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^xterm/#&/' /etc/X11/xinit/xinitrc" : null, + "sed -i 's/^exec xterm/#&/' /etc/X11/xinit/xinitrc" : null, + "sh -c \"echo 'setxkbmap se' >> /etc/X11/xinit/xinitrc\"" : null, + "sh -c \"echo 'xscreensaver -no-splash &' >> /etc/X11/xinit/xinitrc\"" : null, + "sh -c \"echo 'exec {_window_manager}' >> /etc/X11/xinit/xinitrc\"" : {"pass-args" : true}, + "sh -c \"echo 'KEYMAP={_keyboard_layout}\nFONT=lat9w-16' >> /etc/vconsole.conf\"" : {"pass-args" : true}, + "sh -c \"sed -i 's/{ \\\"open terminal\\\", terminal/{ \\\"Chromium\\\", \\\"chromium\\\" },\n &1/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"sed -i 's/{ \\\"open terminal\\\", terminal/{ \\\"File handler\\\", \\\"nemo\\\" },\n &1/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"sed -i 's/^globalkeys = gears.table.join(/&\n awful.key({ modkey, }, \\\"l\\\", function() awful.spawn(\\\"xscreensaver-command -lock &\\\") end),\n/' /etc/xdg/awesome/rc.lua\"" : null, + "sh -c \"awk -i inplace -v RS='' '{gsub(/awful.key\\({ modkey,.*?}, \\\"Tab\\\",.*?\\\"client\\\"}\\),/, \\\"awful.key({ modkey, }, \\\"Tab\\\",\n function ()\n awful.client.focus.byidx(-1)\n if client.focus then\n client.focus:raise()\n end\n end),\n awful.key({ modkey, \\\"Shift\\\" }, \\\"Tab\\\",\n function ()\n awful.client.focus.byidx(1)\n if client.focus then\n client.focus.raise()\n end\n end),\\\"); print}' /etc/xdg/awesome/rc.lua\"" : null, + "gsettings set org.nemo.desktop show-desktop-icons false" : null, + "xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search" : null + } + } +} |