diff --git a/config.scm b/config.scm index a4d19b4..24b47b2 100644 --- a/config.scm +++ b/config.scm @@ -63,6 +63,7 @@ SUBSYSTEM==\"usb_device\", GROUP=\"spice\", MODE=\"0660\" (user-account (name "jerome") (comment "Jérôme") + (password (crypt "password" "$6$abc")) (group "users") (home-directory "/home/jerome") ;; ajout de groupes pour virt-manager @@ -173,7 +174,6 @@ SUBSYSTEM==\"usb_device\", GROUP=\"spice\", MODE=\"0660\" "nextcloud-client" "nitrocli" "nmap" - "nss-certs" "ntfs-3g" "openssh" "openssl" diff --git a/install.sh b/install.sh index 0b805f5..c026e6d 100644 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ DISK="$1" # Vérification de l'existence du disque if [ ! -b "$DISK" ]; then - echo -e "${RED}Creating disk layout...${NC}" + echo -e "${RED}There is no such disk as $DISK !${NC}" exit 1 fi @@ -90,7 +90,8 @@ echo -e "${GREEN}OK${NC}" echo -e -n "${BLUE}Moving configuration to its final location...${NC}" mkdir /mnt/etc -mv config.scm /mnt/etc/config.scm +cp config.scm /mnt/etc/config.scm +sed -i '66d' /mnt/etc/config.scm echo -e "${GREEN}OK${NC}" @@ -98,6 +99,6 @@ echo -e -n "${BLUE}Installing GNU Guix...${NC}" herd start cow-store /mnt -guix system init /mnt/etc/config.scm /mnt +guix system init config.scm /mnt && reboot -echo -e "${GREEN}OK${NC}" +echo -e "${RED}Installation has failed${NC}" diff --git a/procédure_installation_guix.md b/procédure_installation_guix.md index a4d7494..222a67d 100644 --- a/procédure_installation_guix.md +++ b/procédure_installation_guix.md @@ -89,3 +89,16 @@ sudo wget https://www.fdn.fr/ca-vpn-fdn.crt /etc/openvpn/fdn.crt ### Enjoy ? Pour gérer le VPN, c'est avec la commande `sudo herd openvpn` + +### Supprimer/nettoyer l'installation + +17. Récupérer le programme de suppression pré-préparé : +``` + wget forge.chalec.org/neox/guix_jerome/raw/branch/master/wipe.sh +``` + +18. Exécuter l'outil : +``` +chmod +x wipe.sh +./wipe.sh +``` \ No newline at end of file diff --git a/wipe.sh b/wipe.sh new file mode 100644 index 0000000..51cac40 --- /dev/null +++ b/wipe.sh @@ -0,0 +1,61 @@ +#!/run/current-system/profile/bin/bash +# +# Guix Simplified Installer +# +# Copyright (C) 2024 Adrien Bourmault +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +set +x +set -e + +# Définition des couleurs +RED='\033[0;31m' +GREEN='\033[0;32m' +LIGHT_RED='\033[1;31m' +LIGHT_GREEN='\033[1;32m' +YELLOW='\033[1;33m' +BLUE='\033[1;34m' +NC='\033[0m' # No Color + +echo -e "${LIGHT_RED}Welcome to the simple eraser${NC}" +echo -e "${NC}Copyright (C) 2024 Adrien Bourmault ${NC}" +echo -e "${NC}This program is free software, released under the GNU AGPL version 3 or later.${NC}" + + +# Chemin vers le disque +DISK="$1" + +# Vérification de l'existence du disque +if [ ! -b "$DISK" ]; then + echo -e "${RED}There is no such disk as $DISK !${NC}" + exit 1 +fi + +echo -e "${BLUE}Wiping LUKS partitions...${NC}" + +# Lister les partitions du disque +PARTITIONS=$(lsblk -nlp -o NAME | grep "^$DISK") + +# Effacer les en-têtes LUKS de chaque partition +for PARTITION in $PARTITIONS; do + echo -e "${BLUE}Wiping $PARTITION LUKS header...${NC}" + cryptsetup luksErase $PARTITION +done + +echo -e -n "${BLUE}Wiping disk layout...${NC}" + +parted -s "$DISK" mklabel gpt + +echo -e "${GREEN}OK${NC}"