mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-18 02:31:01 +01:00
Add 02x scripts
This commit is contained in:
parent
bfcd75107e
commit
1610ac144c
9
sh/021-sudo
Normal file
9
sh/021-sudo
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Give the wheel group permission to use the sudo and su commands.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Sudo
|
||||
|
||||
set -xe
|
||||
|
||||
echo "%wheel ALL=(ALL) ALL" >> /mnt/etc/sudoers
|
12
sh/022-grub
Normal file
12
sh/022-grub
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Install grub to the primary partition. Then, make the
|
||||
# configuration file for grub.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Grub
|
||||
|
||||
set -xe
|
||||
|
||||
arch-chroot /mnt grub-install /dev/sda
|
||||
|
||||
arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg
|
11
sh/023-mkinitcpio
Normal file
11
sh/023-mkinitcpio
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Save our hardware information with mkinitcpio. This creates
|
||||
# an initial ramdisk environment that allows us to boot the
|
||||
# Linux kernel.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Installation_guide
|
||||
|
||||
set -xe
|
||||
|
||||
arch-chroot /mnt mkinitcpio -p linux
|
7
sh/024-chsh
Normal file
7
sh/024-chsh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Change the shell of the root account to fish.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Command-line_shell
|
||||
|
||||
arch-chroot /mnt chsh -s /usr/bin/fish
|
23
sh/025-user
Normal file
23
sh/025-user
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Create a new user account with sudo privileges and the fish shell.
|
||||
# Then, and add a password to it.
|
||||
#
|
||||
# Note that the default password will be the same as your username.
|
||||
#
|
||||
# To change the root password, use passwd.
|
||||
# To change the new user's password, use passwd <username>.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Password
|
||||
|
||||
set -xe
|
||||
|
||||
$USERNAME = "hello"
|
||||
|
||||
arch-chroot /mnt useradd -m -g users -G wheel -s /usr/bin/fish $USERNAME
|
||||
|
||||
# This is a workaround to the problem of using pipes with arch-chroot
|
||||
echo "echo $USERNAME:$USERNAME | chpasswd" > /mnt/root/chpasswd.sh
|
||||
chmod +x /mnt/root/chpasswd.sh
|
||||
arch-chroot /mnt /root/chpasswd.sh
|
||||
rm /mnt/root/chpasswd.sh
|
15
sh/026-cleanup
Normal file
15
sh/026-cleanup
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The installation process is done. Unmount the filesystem and
|
||||
# restart the computer in order to boot into the new system.
|
||||
#
|
||||
# Alternatively, you can perform more operations with chroot
|
||||
# before you unmount and reboot.
|
||||
#
|
||||
# https://wiki.archlinux.org/index.php/Installation_guide
|
||||
|
||||
set -xe
|
||||
|
||||
umount /mnt
|
||||
|
||||
reboot
|
Loading…
Reference in New Issue
Block a user