mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 01:16:35 +00:00 
			
		
		
		
	Major rewrite (new install)
This commit is contained in:
		
							parent
							
								
									4e89803237
								
							
						
					
					
						commit
						e78b421565
					
				
					 158 changed files with 2542 additions and 5238 deletions
				
			
		| 
						 | 
				
			
			@ -122,7 +122,6 @@ umount /mnt
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
mount -o subvol=root,noatime,lazytime,commit=120,compress=zstd:1 /dev/mapper/cryptfs /mnt
 | 
			
		||||
mount --mkdir -o subvol=snapshots,noatime,lazytime,commit=120,compress=zstd:1 /dev/mapper/cryptfs /mnt/snapshots
 | 
			
		||||
mount --mkdir -o subvol=home,noatime,lazytime,commit=120,compress=zstd:5 /dev/mapper/cryptfs /mnt/data
 | 
			
		||||
mount --mkdir -o noatime,lazytime,commit=120,compress=zstd:1 /dev/mapper/cryptfs /mnt/.btrfs
 | 
			
		||||
mount --mkdir -o subvol=swap /dev/mapper/cryptfs /mnt/swap
 | 
			
		||||
| 
						 | 
				
			
			@ -166,10 +165,10 @@ cd ~/dots
 | 
			
		|||
./install_root.sh
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Enter a fish shell for a better experience
 | 
			
		||||
Enter the ZSH shell for a better experience
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
fish
 | 
			
		||||
zsh
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Create non-privileged user
 | 
			
		||||
| 
						 | 
				
			
			@ -181,7 +180,6 @@ install -o itsdrike -g itsdrike -d /home/itsdrike
 | 
			
		|||
mv ~/dots /home/itsdrike
 | 
			
		||||
chown -R itsdrike:itsdrike /home/itsdrike/dots
 | 
			
		||||
passwd itsdrike
 | 
			
		||||
chsh -s /usr/bin/zsh itsdrike
 | 
			
		||||
su -l itsdrike
 | 
			
		||||
fish
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			@ -200,6 +198,13 @@ exit
 | 
			
		|||
su -l itsdrike
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Setup neovim
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
git clone https://github.com/ItsDrike/lazyvim ~/.config/nvim
 | 
			
		||||
nvim --headless "+Lazy! sync" +qa
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Fstab adjustments
 | 
			
		||||
 | 
			
		||||
Finally, we'll want to make some slight modifications to `/etc/fstab` file, so
 | 
			
		||||
| 
						 | 
				
			
			@ -226,7 +231,6 @@ they're way too permissive. This is how I like to structure my fstab:
 | 
			
		|||
# /dev/mapper/cryptfs LABEL=FS UUID=bffc7a62-0c7e-4aa9-b10e-fd68bac477e0
 | 
			
		||||
/dev/mapper/cryptfs /           btrfs       rw,noatime,lazytime,compress=zstd:1,ssd,space_cache=v2,commit=120,discard=async,subvol=/root        0 1
 | 
			
		||||
/dev/mapper/cryptfs /data       btrfs       rw,noatime,lazytime,compress=zstd:5,ssd,space_cache=v2,commit=120,discard=async,subvol=/data        0 2
 | 
			
		||||
/dev/mapper/cryptfs /snapshots  btrfs       rw,noatime,lazytime,compress=zstd:1,ssd,space_cache=v2,commit=120,discard=async,subvol=/snapshots   0 2
 | 
			
		||||
/dev/mapper/cryptfs /swap       btrfs       rw,subvol=/swap                                                                                     0 0
 | 
			
		||||
/dev/mapper/cryptfs /.btrfs     btrfs       rw,noatime,lazytime,compress=zstd:1,ssd,space_cache=v2,commit=120,discard=async                     0 2
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -104,6 +104,13 @@ script_name="$0"
 | 
			
		|||
shell="$(getent passwd "$USER" | awk -F: '{print $NF}')"
 | 
			
		||||
command=("$@")
 | 
			
		||||
 | 
			
		||||
# This syntax might be a bit confusing at first. It works as follows:
 | 
			
		||||
# 1. Replace this wrapper process with the user's login shell (through exec)
 | 
			
		||||
# 2. The shell is told to run 'exec $@' replacing itself with another process
 | 
			
		||||
# 3. The $@ in the exec above referrs to the arguments passed the shell (after -c '...')
 | 
			
		||||
# 4. "$script_name" is passed to the shell as $0 (process name), not included in $@
 | 
			
		||||
# 5. The ${command[@]} matches the $@ which this script was called with
 | 
			
		||||
# -> The command passed into this script as args is ran within the user's shell
 | 
			
		||||
exec "$shell" -c 'exec "$@"' "$script_name" "${command[@]}"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -150,3 +157,5 @@ command = "tuigreet --time --remember --remember-user-session --asterisks --gree
 | 
			
		|||
# in the `video` group.
 | 
			
		||||
user = "greeter"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Do note that if you're using UWSM, you'll want to run `uwsm start hyprland.desktop` instead of directly running `Hyprland`.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue