diff --git a/NixOS-on-Lenovo-Legion-5-(2021).html b/NixOS-on-Lenovo-Legion-5-(2021).html new file mode 100644 index 0000000..2346c9b --- /dev/null +++ b/NixOS-on-Lenovo-Legion-5-(2021).html @@ -0,0 +1,46 @@ + +NixOS on Lenovo Legion 5 (2021)

discrete graphics on in BIOS - NVIDIA

+

add the following to /etc/nixos/configuration.nix:

+
  # Enable OpenGL
+  hardware.opengl = {
+    enable = true;
+    driSupport = true;
+    driSupport32Bit = true;
+  };
+ 
+  services.xserver.videoDrivers = ["nvidia"];
+  hardware.nvidia = {
+    nvidiaSettings = true;
+    forceFullCompositionPipeline = true;
+    package = config.boot.kernelPackages.nvidiaPackages.production;
+  };
+ 
+services.xserver.dpi = 96;
+ 
+

switchable graphics on in BIOS - iGPU

+
# https://discourse.nixos.org/t/eliminate-screen-tearing-with-intel-mesa/14724
+services.xserver.videoDrivers = [ "intel" ];
+  services.xserver.deviceSection = ''
+    Option "DRI" "2"
+    Option "TearFree" "true"
+  '';
+

Everything else worked fine out of the box - Microphone, Webcam, Bluetooth, Sound, external ports

\ No newline at end of file diff --git a/about.html b/about.html index 6a82c2a..5d0dd19 100644 --- a/about.html +++ b/about.html @@ -1,13 +1,14 @@ -about

Software consultant

+about

Software consultant

  • NixOS
  • nix
  • python
  • neovim
  • qtile
  • +
  • rust
-

Contact | GitHub


      +‎

        resizing manually due to FAT32 limitations and GParted lacks support for the same

        +

        TIL: to backup a boot partition you just need to cp the files from the mounted boot partition to another folder. There is nothing special to backing up. You don’t even have to use dd.

        +

        extra reading

        +

        Bug 649324 – failure to move / resize fat32 partitions less than 256 MB in size

        +

        Workaround: Resizing FAT16/FAT32 Partitions (less than 256 MB)

        +
          +
        1. Backup the data in the FAT16/FAT32 partition
        2. +
        3. Reformat the partition to EXT4
        4. +
        5. Resize EXT4 partition to desired partition size
        6. +
        7. Reformat the partition back to FAT16/FAT32
        8. +
        9. Restore the FAT16/FAT32 files from backup
        10. +
        +

        Note that if you use file system labels you may wish to re-label the partition at this time.

        +

        Gparted gives problems with Fat32 - Unix & Linux Stack Exchange +Failure to move / resize fat32 partitions less than 256 MB in size / Newbie Corner / Arch Linux Forums

        +

        linux - Can’t resize /boot partition (fat32 / EFI system partition) - Unix & Linux Stack Exchange +Since this is the /boot partition containing your kernel, you’ll need to make its new position known to the bootloader (usually GRUB) afterwards. +The exact commands depend on the distribution you’re using, but you’ll usually boot a live CD/USB of your distro, mount your partitions in a chroot environment, and run grub-install /dev/<your main disk>. +With prior experience or a good tutorial, that’s done in five to ten minutes. ;)


          \ No newline at end of file diff --git a/rev/Calisthenics-+-HIIT.html b/rev/Calisthenics-+-HIIT.html new file mode 100644 index 0000000..8154299 --- /dev/null +++ b/rev/Calisthenics-+-HIIT.html @@ -0,0 +1,111 @@ + +Calisthenics + HIIT

          strength training

          +

          The Recommended Routine

          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          RepsExerciseComments
          30sDeadbugs
          5-10Squat Sky ReachesYou can do these assisted.
          10+GMB Wrist PrepDo as many reps as you want
          5-10Yuri’s Shoulder Band WarmupLess good: Stick dislocates, can also be done with a tee-shirt
          10Arch HangsAdd these after you reach Negative Pullups. Beginner attempts will look more like this
          30sSupport HoldAdd these after you reach Negative Dips.
          10Easier Squat progressionAdd these after you reach Bulgarian Split Squats.
          10Easier Hinge progressionAdd these after you reach Banded Nordic Curls.
          +

          First pair: Pull-Ups & Squats

          +
          Pull-Ups, rest 90sec, Negative Pistol Squats, rest 90sec
          +Pull-Ups, rest 90sec, Squats, rest 90sec
          +Pull-Ups, rest 90sec, Squats, rest 90sec
          +
          +

          Second pair Dips & Hinge

          +
          Dips, rest 90sec, Hinge, rest 90sec
          +Dips, rest 90sec, Hinge, rest 90sec
          +Dips, rest 90sec, Hinge, rest 90sec
          +
          +

          Third pair: Rows & Push-ups

          +
          Rows, rest 90sec, Push-ups, rest 90sec
          +Rows, rest 90sec, Push-ups, rest 90sec
          +Rows, rest 90sec, Push-ups, rest 90sec
          +
          +

          Core Triplet

          +
          anti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec
          +anti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec
          +anti-extension, rest 60sec, anti-rotation, rest 60sec, extension, 5ever/until next workout day
          +
          +

          hiit

          +

          beginners_guide - hiit

          +

          11 sets +30 sec work +30 sec rest

          +
            +
          1. warm up - Jump ropes
          2. +
          3. Jump Ropes
          4. +
          5. Pull-Ups
          6. +
          7. High Knees
          8. +
          9. ab workout
          10. +
          11. Scissor Lunges
          12. +
          13. Burpees
          14. +
          15. Squat Jumps
          16. +
          17. Dips
          18. +
          19. Tortoise hold
          20. +
          21. cool down - Jump ropes
          22. +

            \ No newline at end of file diff --git a/setup-github-ssh.html b/setup-github-ssh.html new file mode 100644 index 0000000..a39635b --- /dev/null +++ b/setup-github-ssh.html @@ -0,0 +1,49 @@ + +setup github ssh
              +
            1. +

              generate key +ssh-keygen -t ed25519 -C ”your@email.com” +cat ~/.ssh/id_ed25519.pub

              +
            2. +
            3. +

              copy key to github +cat ~/.ssh/id_ed25519.pub | xclip -sel c +https://github.com/settings/keys

              +
            4. +
            5. +

              add authentication keys and signing keys

              +
            6. +
            7. +

              Testing your SSH connection +ssh -T git@github.com

              +
            8. +
            9. +

              signing your commits

              +
            10. +
            +
            git config --global gpg.format ssh
            +git config --global user.signingkey /PATH/TO/.SSH/KEY.PUB
            +

            make sure email id in ~/.gitconfig matches with your account +git add index.html; git commit -S -m ‘signed commit with correct email’

            +

            +

            Push to GitHub with Personal Access Token (PAT) - jdhao’s digital space +Github dominance in “Soy Tech Industry” vs Linux user - YouTube ~ BugsWriter


              \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 4d767b5..3374574 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,6 +1,6 @@ - https://sohanglal.github.io/Calisthenics-+-HIIT - 2023-09-25T06:49:07.940Z + https://sohanglal.github.io/NixOS-on-Lenovo-Legion-5-(2021) + 2023-11-30T07:33:25.717Z https://sohanglal.github.io/about 2024-02-13T05:27:10.104Z @@ -10,4 +10,13 @@ https://sohanglal.github.io/kde-partition-manager-fiasco 2024-01-12T19:38:56.475Z + + https://sohanglal.github.io/resizing-boot-partition + 2023-12-10T04:35:21.216Z + + https://sohanglal.github.io/rev/Calisthenics-+-HIIT + 2023-09-25T06:49:07.940Z + + https://sohanglal.github.io/setup-github-ssh + 2023-11-11T06:11:52.656Z \ No newline at end of file diff --git a/static/contentIndex.json b/static/contentIndex.json index 8970389..6bd30e4 100644 --- a/static/contentIndex.json +++ b/static/contentIndex.json @@ -1 +1 @@ -{"Calisthenics-+-HIIT":{"title":"Calisthenics + HIIT","links":[],"tags":[],"content":"strength training\nThe Recommended Routine\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nRepsExerciseComments30sDeadbugs5-10Squat Sky ReachesYou can do these assisted.10+GMB Wrist PrepDo as many reps as you want5-10Yuri’s Shoulder Band WarmupLess good: Stick dislocates, can also be done with a tee-shirt10Arch HangsAdd these after you reach Negative Pullups. Beginner attempts will look more like this30sSupport HoldAdd these after you reach Negative Dips.10Easier Squat progressionAdd these after you reach Bulgarian Split Squats.10Easier Hinge progressionAdd these after you reach Banded Nordic Curls.\nFirst pair: Pull-Ups & Squats\nPull-Ups, rest 90sec, Negative Pistol Squats, rest 90sec\nPull-Ups, rest 90sec, Squats, rest 90sec\nPull-Ups, rest 90sec, Squats, rest 90sec\n\nSecond pair Dips & Hinge\nDips, rest 90sec, Hinge, rest 90sec\nDips, rest 90sec, Hinge, rest 90sec\nDips, rest 90sec, Hinge, rest 90sec\n\nThird pair: Rows & Push-ups\nRows, rest 90sec, Push-ups, rest 90sec\nRows, rest 90sec, Push-ups, rest 90sec\nRows, rest 90sec, Push-ups, rest 90sec\n\nCore Triplet\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, 5ever/until next workout day\n\nhiit\nbeginners_guide - hiit\n11 sets\n30 sec work\n30 sec rest\n\nwarm up - Jump ropes\nJump Ropes\nPull-Ups\nHigh Knees\nab workout\nScissor Lunges\nBurpees\nSquat Jumps\nDips\nTortoise hold\ncool down - Jump ropes\n"},"about":{"title":"about","links":[],"tags":[],"content":"Software consultant\n\nNixOS\nnix\npython\nneovim\nqtile\n\nContact | GitHub"},"index":{"title":"‎","links":["kde-partition-manager-fiasco"],"tags":[],"content":"\nkde partition manager fiasco‎\n"},"kde-partition-manager-fiasco":{"title":"kde partition manager fiasco","links":["Kubuntu","NixOS"],"tags":[],"content":"\nwanted shrink Kubuntu to make space for NixOS\nMaybe drive was mounted\nbut still alot of the same issues were observed when searching online\nultimate search term\n\nkde partition manager shrink size in superblock and physical size differ\n\n\nfilesystems - “Either the superblock or the partition table is likely to be corrupt!” after partition resized - Unix & Linux Stack Exchange\n\nAccording to this answer ran e2fsck, a destructive operation just because I was afraid of the command line and didn’t want to use parted\nlong process\nresize2fs would’ve deleted rest of the partitions\nwent off sleep\nseeked a better solution\nfilesystems - “Either the superblock or the partition table is likely to be corrupt!” after partition resized - Unix & Linux Stack Exchange\n\nfound this using growpart to fill the unallocated space, atleast won’t have to delete nixos and windows reserved partitions\n\n\npartition - How to recover filesystem and physical size mismatch - Unix & Linux Stack Exchange\n\nthen came across this solution to use parted\nbasically partition table via parted got updated but resize2fs failed to resize the filesystem\nsimple solution is to update the partition table to the original standard\nused sudo fdisk -l to read start and end sectors\nentered parted /dev/nvme0n1\nresizepart 4 859174911s\n\ngave sector number for perfect granuality\nParted - ArchWiki\n\n\n\n\n\n\nhad to e2fsck again\n\nthis reversed all the destructive changes that I made the day before\n\n\nKubuntu still wouldn’t boot\nfor some reason the files in /boot vanished\nbackup was there on desktop\ncopied those files from Desktop to /boot started working again\neven though the boot partition is mounted on /boot/efi, kubuntu had installed the files in /boot which is p4 and /boot/efi is on p1\nTo boot into kubuntu using the backup files, used this guide: Classic SysAdmin: How to Rescue a Non-booting GRUB 2 on Linux - Linux Foundation\ngrub> set root=(hd0,1)\ngrub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1\ngrub> initrd /boot/initrd.img-3.13.0-29-generic\ngrub> boot\ncouldn’t run sudo update-grub\ndid sudo mkidr <whatever had to be made>\nran after that\non success, it will show that the vmlinuz and initrd images were found\nsudo grub install /dev/nvme0n1\nRan diff -r against backups to make sure there weren’t any destructive changes\nCompleted 2024-01-11\n"}} \ No newline at end of file +{"NixOS-on-Lenovo-Legion-5-(2021)":{"title":"NixOS on Lenovo Legion 5 (2021)","links":[],"tags":[],"content":"discrete graphics on in BIOS - NVIDIA\nadd the following to /etc/nixos/configuration.nix:\n # Enable OpenGL\n hardware.opengl = {\n enable = true;\n driSupport = true;\n driSupport32Bit = true;\n };\n \n services.xserver.videoDrivers = ["nvidia"];\n hardware.nvidia = {\n nvidiaSettings = true;\n forceFullCompositionPipeline = true;\n package = config.boot.kernelPackages.nvidiaPackages.production;\n };\n \nservices.xserver.dpi = 96;\n \nswitchable graphics on in BIOS - iGPU\n# https://discourse.nixos.org/t/eliminate-screen-tearing-with-intel-mesa/14724\nservices.xserver.videoDrivers = [ "intel" ];\n services.xserver.deviceSection = ''\n Option "DRI" "2"\n Option "TearFree" "true"\n '';\nEverything else worked fine out of the box - Microphone, Webcam, Bluetooth, Sound, external ports"},"about":{"title":"about","links":[],"tags":[],"content":"Software consultant\n\nNixOS\nnix\npython\nneovim\nqtile\nrust\n\nContact | GitHub"},"index":{"title":"‎","links":["kde-partition-manager-fiasco","NixOS-on-Lenovo-Legion-5-(2021)","resizing-boot-partition","setup-github-ssh"],"tags":[],"content":"\nkde partition manager fiasco‎\nNixOS on Lenovo Legion 5 (2021)\nresizing boot partition\nsetup github ssh\n"},"kde-partition-manager-fiasco":{"title":"kde partition manager fiasco","links":["Kubuntu","NixOS"],"tags":[],"content":"\nwanted shrink Kubuntu to make space for NixOS\nMaybe drive was mounted\nbut still alot of the same issues were observed when searching online\nultimate search term\n\nkde partition manager shrink size in superblock and physical size differ\n\n\nfilesystems - “Either the superblock or the partition table is likely to be corrupt!” after partition resized - Unix & Linux Stack Exchange\n\nAccording to this answer ran e2fsck, a destructive operation just because I was afraid of the command line and didn’t want to use parted\nlong process\nresize2fs would’ve deleted rest of the partitions\nwent off sleep\nseeked a better solution\nfilesystems - “Either the superblock or the partition table is likely to be corrupt!” after partition resized - Unix & Linux Stack Exchange\n\nfound this using growpart to fill the unallocated space, atleast won’t have to delete nixos and windows reserved partitions\n\n\npartition - How to recover filesystem and physical size mismatch - Unix & Linux Stack Exchange\n\nthen came across this solution to use parted\nbasically partition table via parted got updated but resize2fs failed to resize the filesystem\nsimple solution is to update the partition table to the original standard\nused sudo fdisk -l to read start and end sectors\nentered parted /dev/nvme0n1\nresizepart 4 859174911s\n\ngave sector number for perfect granuality\nParted - ArchWiki\n\n\n\n\n\n\nhad to e2fsck again\n\nthis reversed all the destructive changes that I made the day before\n\n\nKubuntu still wouldn’t boot\nfor some reason the files in /boot vanished\nbackup was there on desktop\ncopied those files from Desktop to /boot started working again\neven though the boot partition is mounted on /boot/efi, kubuntu had installed the files in /boot which is p4 and /boot/efi is on p1\nTo boot into kubuntu using the backup files, used this guide: Classic SysAdmin: How to Rescue a Non-booting GRUB 2 on Linux - Linux Foundation\ngrub> set root=(hd0,1)\ngrub> linux /boot/vmlinuz-3.13.0-29-generic root=/dev/sda1\ngrub> initrd /boot/initrd.img-3.13.0-29-generic\ngrub> boot\ncouldn’t run sudo update-grub\ndid sudo mkidr <whatever had to be made>\nran after that\non success, it will show that the vmlinuz and initrd images were found\nsudo grub install /dev/nvme0n1\nRan diff -r against backups to make sure there weren’t any destructive changes\nCompleted 2024-01-11\n"},"resizing-boot-partition":{"title":"resizing boot partition","links":["FAT32","GParted"],"tags":[],"content":"resizing manually due to FAT32 limitations and GParted lacks support for the same\nTIL: to backup a boot partition you just need to cp the files from the mounted boot partition to another folder. There is nothing special to backing up. You don’t even have to use dd.\nextra reading\nBug 649324 – failure to move / resize fat32 partitions less than 256 MB in size\nWorkaround: Resizing FAT16/FAT32 Partitions (less than 256 MB)\n\nBackup the data in the FAT16/FAT32 partition\nReformat the partition to EXT4\nResize EXT4 partition to desired partition size\nReformat the partition back to FAT16/FAT32\nRestore the FAT16/FAT32 files from backup\n\nNote that if you use file system labels you may wish to re-label the partition at this time.\nGparted gives problems with Fat32 - Unix & Linux Stack Exchange\nFailure to move / resize fat32 partitions less than 256 MB in size / Newbie Corner / Arch Linux Forums\nlinux - Can’t resize /boot partition (fat32 / EFI system partition) - Unix & Linux Stack Exchange\nSince this is the /boot partition containing your kernel, you’ll need to make its new position known to the bootloader (usually GRUB) afterwards.\nThe exact commands depend on the distribution you’re using, but you’ll usually boot a live CD/USB of your distro, mount your partitions in a chroot environment, and run grub-install /dev/<your main disk>.\nWith prior experience or a good tutorial, that’s done in five to ten minutes. ;)"},"rev/Calisthenics-+-HIIT":{"title":"Calisthenics + HIIT","links":[],"tags":[],"content":"strength training\nThe Recommended Routine\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nRepsExerciseComments30sDeadbugs5-10Squat Sky ReachesYou can do these assisted.10+GMB Wrist PrepDo as many reps as you want5-10Yuri’s Shoulder Band WarmupLess good: Stick dislocates, can also be done with a tee-shirt10Arch HangsAdd these after you reach Negative Pullups. Beginner attempts will look more like this30sSupport HoldAdd these after you reach Negative Dips.10Easier Squat progressionAdd these after you reach Bulgarian Split Squats.10Easier Hinge progressionAdd these after you reach Banded Nordic Curls.\nFirst pair: Pull-Ups & Squats\nPull-Ups, rest 90sec, Negative Pistol Squats, rest 90sec\nPull-Ups, rest 90sec, Squats, rest 90sec\nPull-Ups, rest 90sec, Squats, rest 90sec\n\nSecond pair Dips & Hinge\nDips, rest 90sec, Hinge, rest 90sec\nDips, rest 90sec, Hinge, rest 90sec\nDips, rest 90sec, Hinge, rest 90sec\n\nThird pair: Rows & Push-ups\nRows, rest 90sec, Push-ups, rest 90sec\nRows, rest 90sec, Push-ups, rest 90sec\nRows, rest 90sec, Push-ups, rest 90sec\n\nCore Triplet\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, rest 60sec\nanti-extension, rest 60sec, anti-rotation, rest 60sec, extension, 5ever/until next workout day\n\nhiit\nbeginners_guide - hiit\n11 sets\n30 sec work\n30 sec rest\n\nwarm up - Jump ropes\nJump Ropes\nPull-Ups\nHigh Knees\nab workout\nScissor Lunges\nBurpees\nSquat Jumps\nDips\nTortoise hold\ncool down - Jump ropes\n"},"setup-github-ssh":{"title":"setup github ssh","links":["BugsWriter"],"tags":[],"content":"\n\ngenerate key\nssh-keygen -t ed25519 -C ”your@email.com”\ncat ~/.ssh/id_ed25519.pub\n\n\ncopy key to github\ncat ~/.ssh/id_ed25519.pub | xclip -sel c\nhttps://github.com/settings/keys\n\n\nadd authentication keys and signing keys\n\n\nTesting your SSH connection\nssh -T git@github.com\n\n\nsigning your commits\n\n\ngit config --global gpg.format ssh\ngit config --global user.signingkey /PATH/TO/.SSH/KEY.PUB\nmake sure email id in ~/.gitconfig matches with your account\ngit add index.html; git commit -S -m ‘signed commit with correct email’\n\nPush to GitHub with Personal Access Token (PAT) - jdhao’s digital space\nGithub dominance in “Soy Tech Industry” vs Linux user - YouTube ~ BugsWriter"}} \ No newline at end of file