Add default options to install script as well as health checks and remove maintenance mode

This commit is contained in:
Tyler Kelley 2024-03-01 16:18:30 -06:00
parent a2f5c7da16
commit 24daebf4d3
5 changed files with 130 additions and 62 deletions

View File

@ -1,9 +1,5 @@
<div align="center">
## MAINTENANCE MODE
Updates are in programs this will end in less than one hour.
## ZaneyOS 🟰 Best ❄️ NixOS Configs
ZaneyOS is a simple way of reproducing my configuration on any NixOS system. This includes the wallpaper, scripts, applications, config files, and more.

View File

@ -21,9 +21,6 @@ in with lib; {
modifier = "SUPER";
in concatStrings [ ''
monitor=,preferred,auto,1
windowrule = float, ^(steam)$
windowrule = size 1080 900, ^(steam)$
windowrule = center, ^(steam)$
windowrule = fullscreen, ^(wlogout)$
windowrule = animation fade,^(wlogout)$
general {

View File

@ -1,61 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, username, ... }:
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
./config/system/persistence.nix
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "uas" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=35%" "mode=755" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/CF00-A288";
fsType = "vfat";
options = [ "umask=0077" ];
};
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/86765b18-75f6-4900-809a-2931a8dac75e";
{ device = "/dev/disk/by-uuid/b6d7783f-dd7c-493f-af02-923ca3394157";
fsType = "ext4";
};
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1a35e8d0-f13c-43f3-8c12-3aaa5059c8a3";
boot.initrd.luks.devices."luks-0e0fc3ab-a29c-4a80-997a-9803ab509da7".device = "/dev/disk/by-uuid/0e0fc3ab-a29c-4a80-997a-9803ab509da7";
fileSystems."/etc/nixos" =
{
device = "/nix/persist/etc/nixos";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/var/log" =
{
device = "/nix/persist/var/log";
fsType = "none";
options = [ "bind" ];
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/76A0-C7B3";
fsType = "vfat";
};
swapDevices =
[{
device = "/dev/disk/by-partuuid/b77747cb-7eb5-4d78-bb6a-34ded8eb7c23";
randomEncryption.enable = true;
}];
[ { device = "/dev/disk/by-uuid/0614aea1-bd66-4bad-b99e-853e99e0be23"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -43,21 +43,39 @@ fi
echo "-----"
echo "Default options are in brackets []"
echo "Just press enter to select the default"
sleep 2
echo "-----"
echo "Cloning & Entering ZaneyOS Repository"
git clone https://gitlab.com/zaney/zaneyos.git
cd zaneyos
echo "-----"
read -p "Enter Your New Username: " userName
installusername=$(echo $USER)
read -p "Enter Your Username [ $installusername ]: " userName
if [ -z "$userName" ]; then
userName=$(echo $USER)
else
echo "The username you choose is new to the system."
echo "This requires setting a new password."
read -p "Enter New User Password: " newPass
echo "Set password."
userPassword=$(mkpasswd -m sha-512 $newPass)
escaped_userPassword=$(echo "$userPassword" | sed 's/\//\\\//g')
sed -i "/^\s*hashedPassword[[:space:]]*=[[:space:]]*\"/s#\"\(.*\)\"#\"$escaped_userPassword\"#" ./system.nix
fi
sed -i "/^\s*username[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$userName\"/" ./options.nix
echo "The password for a new user is password"
sleep 2
echo "-----"
read -p "Enter Your New Hostname: " hostName
read -p "Enter Your New Hostname: [ hyprnix ]" hostName
if [ -z "$hostName" ]; then
hostName="hyprnix"
fi
sed -i "/^\s*hostname[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$hostName\"/" ./options.nix
echo "-----"
@ -72,55 +90,140 @@ sed -i "/^\s*gitEmail[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$gitEmail\"/" ./
echo "-----"
read -p "Enter Your Locale, Example> en_US.UTF-8 : " locale
read -p "Enter Your Locale: [ en_US.UTF-8 ] " locale
if [ -z "$locale" ]; then
locale="en_US.UTF-8"
fi
sed -i "/^\s*theLocale[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$locale\"/" ./options.nix
echo "-----"
read -p "Enter Your Keyboard Layout, Example> us : " kbdLayout
read -p "Enter Your Keyboard Layout: [ us ] " kbdLayout
if [ -z "$kbdLayout" ]; then
kbdLayout="us"
fi
sed -i "/^\s*theKBDLayout[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$kbdLayout\"/" ./options.nix
echo "-----"
read -p "Enter Your Timezone, Example> America/New_York : " timezone
read -p "Enter Your Timezone: [ America/New_York ] " timezone
if [ -z "$timezone" ]; then
timezone="America/New_York"
fi
escaped_timezone=$(echo "$timezone" | sed 's/\//\\\//g')
sed -i "/^\s*theTimezone[[:space:]]*=[[:space:]]*\"/s#\"\(.*\)\"#\"$escaped_timezone\"#" ./options.nix
echo "-----"
read -p "Enter Your Desired Browser, Example> firefox : " browser
read -p "Enter Your Desired Browser: [ firefox ] " browser
if [ -z "$browser" ]; then
browser="firefox"
fi
sed -i "/^\s*browser[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$browser\"/" ./options.nix
echo "-----"
read -p "Enable Animated Borders, ONLY true OR false : " animBorder
read -p "Enable Animated Borders: [ false ] " animBorder
user_input_lower=$(echo "$animBorder" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
y|yes|true|t|enable)
animBorder="true"
;;
*)
animBorder="false"
;;
esac
sed -i "/^\s*borderAnim[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$animBorder\"/" ./options.nix
echo "-----"
read -p "Install Kdenlive, ONLY true OR false : " kdenlive
read -p "Install Kdenlive [ false ] : " kdenlive
user_input_lower=$(echo "$kdenlive" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
y|yes|true|t|enable)
kdenlive="true"
;;
*)
kdenlive="false"
;;
esac
sed -i "/^\s*kdenlive[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$kdenlive\"/" ./options.nix
echo "-----"
read -p "Enable Printer Support, ONLY true OR false : " printers
read -p "Enable Printer Support: [ false ] " printers
user_input_lower=$(echo "$printers" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
y|yes|true|t|enable)
printers="true"
;;
*)
printers="false"
;;
esac
sed -i "/^\s*printer[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$printers\"/" ./options.nix
echo "-----"
read -p "Enable Flatpak Support, ONLY true OR false : " flatpaks
read -p "Enable Flatpak Support: [ false ] " flatpaks
user_input_lower=$(echo "$printers" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
y|yes|true|t|enable)
printers="true"
;;
*)
printers="false"
;;
esac
sed -i "/^\s*flatpak[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$flatpaks\"/" ./options.nix
echo "-----"
echo "Valid options include amd, intel, and vm"
read -p "Enter Your CPU Type : " cpuType
read -p "Enter Your CPU Type: [ intel ] " cpuType
user_input_lower=$(echo "$cpuType" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
amd)
cpuType="amd"
;;
intel)
cpuType="intel"
;;
vm)
cpuType="vm"
;;
*)
echo "Option Entered Not Available, Falling Back To [ intel ] Option."
sleep 1
cpuType="intel"
;;
esac
sed -i "/^\s*cpuType[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$cpuType\"/" ./options.nix
echo "-----"
echo "Valid options include amd, intel, nvidia, vm, intel-nvidia"
read -p "Enter Your GPU Type : " gpuType
user_input_lower=$(echo "$gpuType" | tr '[:upper:]' '[:lower:]')
case $user_input_lower in
amd)
gpuType="amd"
;;
intel)
gpuType="intel"
;;
vm)
gpuType="vm"
;;
intel-nvidia)
gpuType="intel-nvidia"
;;
*)
echo "Option Entered Not Available, Falling Back To [ intel ] Option."
sleep 1
gpuType="intel"
;;
esac
sed -i "/^\s*gpuType[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$gpuType\"/" ./options.nix
echo "Generating The Hardware Configuration"

View File

@ -11,8 +11,8 @@ let
waybarStyle = "simplebar"; # simplebar, slickbar, or default
in {
# User Variables
username = "${username}";
hostname = "${hostname}";
username = "zaney";
hostname = "hyprnix";
gitUsername = "Tyler Kelley";
gitEmail = "tylerzanekelley@gmail.com";
theme = "3024";