Giter Site home page Giter Site logo

not-my-dotfiles's Introduction



Rxyhn's Dotfiles

NixOS logo


NixOS / Home-Manager / Flake



โ„๏ธ Information

- Operating System:
- Window Manager:
- Compositor:
- Terminal:
- Shell:
- Editor:
- GPU:
NixOS
AwesomeWM
Picom
Wezterm
ZSH
Helix
Nvidia


๐Ÿ”ง Installation

  1. Download iso

    # Yoink nixos-unstable
    wget -O nixos.iso https://channels.nixos.org/nixos-unstable/latest-nixos-minimal-x86_64-linux.iso
    
    # Write it to a flash drive
    cp nixos.iso /dev/sdX
  2. Boot into the installer.

  3. Switch to root user: sudo -i

  4. Partitioning

    We create a 512MB EFI boot partition (/dev/nvme0n1p1) and the rest will be our LUKS encrypted physical volume for LVM (/dev/nvme0n1p2).

    $ gdisk /dev/nvme0n1
    • o (create new empty partition table)
    • n (add partition, 512M, type ef00 EFI)
    • n (add partition, remaining space, type 8e00 Linux LVM)
    • w (write partition table and exit)

    Setup the encrypted LUKS partition and open it:

    $ cryptsetup luksFormat /dev/nvme0n1p2
    $ cryptsetup config /dev/nvme0n1p2 --label cryptroot
    $ cryptsetup luksOpen /dev/nvme0n1p2 enc

    We create two logical volumes, a 24GB swap parition and the rest will be our root filesystem

    $ pvcreate /dev/mapper/enc
    $ vgcreate vg /dev/mapper/enc
    $ lvcreate -L 24G -n swap vg
    $ lvcreate -l '100%FREE' -n root vg

    Format partitions

    $ mkfs.fat -F 32 -n boot /dev/nvme0n1p1
    $ mkswap -L swap /dev/vg/swap
    $ swapon /dev/vg/swap
    $ mkfs.btrfs -L root /dev/vg/root

    Mount partitions

    $ mount -t btrfs /dev/vg/root /mnt
    
    # Create the subvolumes
    $ btrfs subvolume create /mnt/root
    $ btrfs subvolume create /mnt/home
    $ btrfs subvolume create /mnt/nix
    $ btrfs subvolume create /mnt/log
    $ umount /mnt
    
    # Mount the directories
    $ mount -o subvol=root,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt
    $ mkdir -p /mnt/{home,nix,var/log}
    $ mount -o subvol=home,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/home
    $ mount -o subvol=nix,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/nix
    $ mount -o subvol=log,compress=zstd,noatime,ssd,space_cache=v2 /dev/vg/root /mnt/var/log
    
    # Mount boot partition
    $ mkdir /mnt/boot
    $ mount /dev/nvme0n1p1 /mnt/boot
  5. Enable flakes

    $ nix-shell -p nixFlakes
  6. Install nixos from flake

    $ nixos-install --flake 'github:rxyhn/yuki#lenovo'
  7. Reboot, login as root, and change the password for your user using passwd

  8. Log in as your normal user.

  9. Install the home manager configuration

    $ home-manager switch --flake 'github:rxyhn/yuki#rxyhn@lenovo'


๐Ÿ’ก Acknowledgements

โš ๏ธ WARNING โš ๏ธ
It worked perfectly on my machine, but I can't guarantee it will work on your machine
Powered by NixOS/Linux x86_64

Other dotfiles

not-my-dotfiles's People

Contributors

rxyhn avatar moni-dz avatar fufexan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.