Clone the repo:
git clone git@github.com:giornn0/nixos-config ~/.nixos_config
In the file /etc/nixos/configuration.nix, the boot-loader configurations may need some tweaks related to your installation.
Keep in mind that you will need mostly the last part of this file.
After the check for the configuration file, copy the hardware file:
sudo cp /etc/nixos/hardware-configuration.nix ~/nixos_config/base
Then setup the symlink with this folder:
sudo rm /etc/nixos && sudo ln -s ~/.nixos_config /etc/nixos
After setting up all the files run:
sudo nixos-rebuild switch
You can create easily some basic folders:
mkdir ~/Documents && mkdir ~/Downloads
If everything runs fine, you can run the cmd: os-update
whenever you want to change the configuration
Regarding Hyprland setup, some inspiration was taken from @HeinzDev and @fufexan dotfiles.
For now, I handle npm packages with a local installation for user:
npm config set prefix $HOME/.npm
After that you will be able to install packages with -g flag.
npm i -g @angular/language-server @vtsls/language-server
//maybe there is no need for these two typescript-language-server typescript
The possible command will be available because there is already configured the directory $HOME/.npm in the shell PATH.
For package version update, use nix flake update
Otherwise for general changes, use os-update
- First, identify the USB drive device name (e.g., /dev/sdb) using a command like:
lsblk
- Unmount any partition on the USB drive:
sudo umount /dev/sd{X}
Replace the {x} with letter of the correspondent USB drive.
- Use the
dd
command to overwrite the drive with zeros:
sudo dd if=/dev/zero of=/dev/sd{x} bs=4M status=progress
This will erase the data on the drive.
- After the process complete you can create a new partition:
sudo fdisk /dev/sd{x}
- Press 'o' to create a new empty DOS partition table, then 'w' to write the changes and exit.
- Finally you can format the drive with a new filesystem:
sudo mkfs.vfat /dev/sd{x}