This commit is contained in:
nm1 2026-11-04 00:33:23 +05:30
commit 74ae93a96e
7 changed files with 94691 additions and 0 deletions

View file

@ -0,0 +1,180 @@
applets
to create applet for linux mint cinnamon DE
# Applet for Linux Cinnamon to Display Download/Upload Speed
Here's a simple applet code for Linux Cinnamon that displays your current network download and upload speeds. This creates a panel applet similar to what you might see in Windows task manager or other system monitors.
## Prerequisites
1. Linux Cinnamon desktop environment
2. Python 3.x
3. `gir1.2-gtk-3.0` and `gir1.2-appindicator3-0.1` packages (usually installed by default)
## Applet Code
Create a new directory for your applet and save these files:
### 1. `network-speed@yourname/files/network-speed@yourname/applet.js`
```javascript
const Applet = imports.ui.applet;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const St = imports.gi.St;
const Mainloop = imports.mainloop;
const Gettext = imports.gettext;
function MyApplet(metadata, orientation, panel_height, instance_id) {
this._init(metadata, orientation, panel_height, instance_id);
}
MyApplet.prototype = {
__proto__: Applet.TextIconApplet.prototype,
_init: function(metadata, orientation, panel_height, instance_id) {
Applet.TextIconApplet.prototype._init.call(this, orientation, panel_height, instance_id);
try {
this.metadata = metadata;
this.uuid = this.metadata.uuid;
this.instance_id = instance_id;
this.setAllowedLayout(Applet.AllowedLayout.BOTH);
// Initial values
this.downSpeed = 0;
this.upSpeed = 0;
this.prevDownBytes = 0;
this.prevUpBytes = 0;
// Get initial network stats
this.getNetworkStats();
// Update every second
this.timeout = Mainloop.timeout_add_seconds(1, () => {
this.getNetworkStats();
return true;
});
this.on_orientation_changed(orientation);
} catch (e) {
global.logError(e);
}
},
getNetworkStats: function() {
try {
let [res, out, err, status] = GLib.spawn_command_line_sync('cat /proc/net/dev');
if (status === 0) {
let lines = out.toString().split('\n');
let downBytes = 0;
let upBytes = 0;
// Skip first 2 lines (header)
for (let i = 2; i < lines.length; i++) {
let line = lines[i].trim();
if (line === '') continue;
let iface = line.split(':')[0].trim();
// Skip lo (loopback) interface
if (iface === 'lo') continue;
let stats = line.split(':')[1].trim().split(/\s+/);
downBytes += parseInt(stats[0]);
upBytes += parseInt(stats[8]);
}
// Calculate speeds (bytes per second)
if (this.prevDownBytes > 0 && this.prevUpBytes > 0) {
this.downSpeed = downBytes - this.prevDownBytes;
this.upSpeed = upBytes - this.prevUpBytes;
}
this.prevDownBytes = downBytes;
this.prevUpBytes = upBytes;
this.updateUI();
}
} catch (e) {
global.logError(e);
}
},
updateUI: function() {
try {
let down = this.formatSpeed(this.downSpeed);
let up = this.formatSpeed(this.upSpeed);
this.set_applet_label(`↓${down} ↑${up}`);
} catch (e) {
global.logError(e);
}
},
formatSpeed: function(bytes) {
if (bytes < 1024) {
return bytes + 'B';
} else if (bytes < 1024 * 1024) {
return Math.round(bytes / 1024) + 'K';
} else {
return Math.round(bytes / (1024 * 1024)) + 'M';
}
},
on_orientation_changed: function(orientation) {
this.orientation = orientation;
},
on_applet_removed_from_panel: function() {
if (this.timeout) {
Mainloop.source_remove(this.timeout);
}
}
};
function main(metadata, orientation, panel_height, instance_id) {
return new MyApplet(metadata, orientation, panel_height, instance_id);
}
```
### 2. `network-speed@yourname/files/network-speed@yourname/metadata.json`
```json
{
"uuid": "network-speed@yourname",
"name": "Network Speed Monitor",
"description": "Displays current download and upload speeds",
"icon": "network-wired",
"max-instances": 1
}
```
### 3. `network-speed@yourname/files/network-speed@yourname/stylesheet.css`
```css
.network-speed-applet {
padding: 2px;
}
```
## Installation
1. Create the directory structure:
```bash
mkdir -p ~/.local/share/cinnamon/applets/network-speed@yourname
```
2. Copy the three files above to this directory.
3. Restart Cinnamon (press Alt+F2, type "r" and press Enter).
4. Right-click on the panel, choose "Applets", find "Network Speed Monitor" and add it to your panel.
## Customization Options
1. You can change the update interval by modifying the timeout value in `applet.js`.
2. To change the display format, modify the `formatSpeed` function.
3. You can add tooltips or more detailed information by expanding the code.
This applet reads from `/proc/net/dev` to get network statistics, which is the most reliable method on Linux. It shows download (↓) and upload (↑) speeds in a compact format (B for bytes, K for kilobytes, M for megabytes per second).

View file

@ -0,0 +1,8 @@
basics
to automatically install all prompts use
`sudo apt install librewolf -y`
- to install packages offline in debian use this
`sudo dpkg -i windscribe_2.14.12_amd64.deb`
if facing error in borken/missing dependencies use this and then start offline way again
`sudo apt install -f`

View file

@ -0,0 +1,22 @@
extras
**to install nerd fonts**
1. go to this site https://www.nerdfonts.com/font-downloads and download zip package
2. in `.local/share/fonts` (create fonts if not already there) copy the extracted version and then restart the terminal and fonts will be loaded
- old debian pacages resides in universe repo
https://old-releases.ubuntu.com/ubuntu/pool/universe/s/sshpass/
&nbsp;
for gpu temperature check
`sensors` and for gpu other process `radeontop`
&nbsp;
to know ubuntu/debian releases
`echo $(lsb_release -cs)`
&nbsp;
to know about which ubuntu release in detail
`tail -n 3 /etc/os-release`

View file

@ -0,0 +1,263 @@
i3 wm
todo
lock screen change
dark mode
sleep mode
dmenu : win+D
to include desktop shortcut
1. `nano ~/.config/i3/config`
2. Find the keybinding for your application launcher (usually bindsym $mod+d).
3. Change `dmenu_run` to `i3-dmenu-desktop`:
`bindsym $mod+d exec --no-startup-id i3-dmenu-desktop`
or for with icons and better use
`bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons`
(make sure to install rofi)
5. Reload i3 with $mod+Shift+c or $mod+Shift+r to apply the changes
&nbsp;
tabbed mode : win + w
split mode : win + e
stack mode : win + s3
log out and log in of sway (to apply effects) : win+shift+r
logout : mod+shift+e
themes and something else (llm generated)
[dark theme i3.md](../../../_resources/dark%20theme%20i3.md)
1st step fixed flatpak and some other theme (xdg protal one)
2nd step fixed xfce apps (gtk settings one321)
or this can be installed too for gui changes
`sudo apt install lxappearance gtk-chtheme qt4-qtconfig`
qt4qtconfig is outdated so use `qt5ct` to make changes
in `/etc/environment` have this `echo $QT_QPA_PLATFORMTHEME=qt5ct:qt6ct` and reboot
also install these
`sudo apt install breeze qt6-gtk-platformtheme qt6ct qt5ct`
now in toolbar set the theme like breeze dark
for flatpak
`flatpak --user override --env=GTK_THEME=Adwaita:dark`
and to unset it
`flatpak --user override --unset-env=GTK_THEME`
and for gtk4 and libwaita this will help for dark theme
`ADW_DEBUG_COLOR_SCHEME=prefer-dark`
theme that are availables in mine
```txt
Adwaita Mint-L-Aqua Mint-L-Dark-Brown Mint-L-Darker-Orange Mint-L-Dark-Grey Mint-L-Dark-Teal Mint-L-Sand Mint-X-compact Mint-X-Sand Mint-Y-Dark-Aqua Mint-Y-Dark-Red Mint-Y-Purple
Adwaita-dark Mint-L-Blue Mint-L-Darker Mint-L-Darker-Pink Mint-L-Dark-Orange Mint-L-Grey Mint-L-Teal Mint-X-Grey Mint-X-Teal Mint-Y-Dark-Blue Mint-Y-Dark-Sand Mint-Y-Red
Default Mint-L-Brown Mint-L-Darker-Aqua Mint-L-Darker-Purple Mint-L-Dark-Pink Mint-L-Orange Mint-X Mint-X-Orange Mint-Y Mint-Y-Dark-Grey Mint-Y-Dark-Teal Mint-Y-Sand
Emacs Mint-L-Dark Mint-L-Darker-Blue Mint-L-Darker-Red Mint-L-Dark-Purple Mint-L-Pink Mint-X-Aqua Mint-X-Pink Mint-Y-Aqua Mint-Y-Dark-Orange Mint-Y-Grey Mint-Y-Teal
HighContrast Mint-L-Dark-Aqua Mint-L-Darker-Brown Mint-L-Darker-Sand Mint-L-Dark-Red Mint-L-Purple Mint-X-Blue Mint-X-Purple Mint-Y-Blue Mint-Y-Dark-Pink Mint-Y-Orange Raleigh
Mint-L Mint-L-Dark-Blue Mint-L-Darker-Grey Mint-L-Darker-Teal Mint-L-Dark-Sand Mint-L-Red Mint-X-Brown Mint-X-Red Mint-Y-Dark Mint-Y-Dark-Purple Mint-Y-Pink
```
### lock, suspend
instead of using one like cinnamon login manager, it will use something like i3lock
https://github.com/betterlockscreen/betterlockscreen
`wget https://raw.githubusercontent.com/betterlockscreen/betterlockscreen/main/install.sh -O - -q | bash -s user
`
and then
store `~/.local/.bin` in PATH
and
`sudo apt install imagemagick`
also install this
`https://github.com/Raymo111/i3lock-color`
in i3 config file
`exec no-startup-id xautolock -time 15 -locker "systemctl suspend"`
use exec_always if u want changes to take place after reload instead of just reloading configs via mod+shift+r.
`exec_always --no-startup-id xautolock -time 15 -locker "systemctl suspend"`
for wakelock to prevent sleep , this alias
```sh
alias nosl="systemd-inhibit --what=sleep --who="bot" --why="discord bot running" sleep infinity"
```
about waking up after suspend
```sh
# Shows the hardware-level wake reason (e.g. "PCI PME#", "Power Switch", "RTC")
sudo dmidecode | grep Wake-up
# Check which IRQ caused the last wake
cat /sys/power/pm_wakeup_irq
```
kernel sources
```sh
# Shows all wakeup sources with event counts
cat /sys/kernel/debug/wakeup_sources
# and for more
# List all wakeup-capable devices
ls /sys/class/wakeup/
# Check event counts (compare before/after suspend to find the culprit)
for i in /sys/class/wakeup/wakeup*; do
echo "$i: $(cat $i/event_count)"
done
```
**better status bar**
install i3blocks
```sh
sudo apt install i3blocks
cp /etc/i3blocks.conf ~/.config/i3/i3blocks.conf
```
then replacing i3status with i3blocks:
```txt
bar {
status_command i3blocks
}
```
&nbsp;
### brightness and volume keybinds
`sudo apt install brightnessctl`
to prevent brightnessctl to require sudo, do this
`sudo usermod -aG video $USER`
then in config
```txt
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
```
for volume as it is changed to i3blocks do this. basically this first line is important so change that
```txt
set $refresh_i3status pkill -SIGRTMIN+10 i3blocks
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
```
and also
`cinnamon-settings sound` to open cinnamon inbuilt sound control or `pavucontrol` for another one
natural scroling
add this in i3 config
this touchpad device can be listed by finding from `xinput list`
```txt
exec_always --no-startup-id xinput set-prop "ELAN0708:00 04F3:30A0 Touchpad" "libinput Natural Scrolling Enabled" 1
```
for pasting content from clipboard to markdown
in config
```sh
bindsym $mod+shift+p exec --no-startup-id bash /home/hpmi/Videos/imp/scripts/attachment-clipboard.sh "normal"
bindsym $mod+shift+Mod1+p exec --no-startup-id bash /home/hpmi/Videos/imp/scripts/attachment-clipboard.sh "alt"
```
and the script used
```sh
pasteToArea(){
MY_VAR="$1"
# 1. Copy the variable to the clipboard
echo -n "$MY_VAR" | xclip -selection clipboard
# 2. Force xdotool to wait until you release the physical hotkey,
# then clear modifiers and paste. This prevents key conflicts.
sleep 1
xdotool key --clearmodifiers ctrl+v
}
DESTINATION="$HOME/.gram-md/_assets"
# normal or alt
mode=$1
echo $mode
if xclip -selection clipboard -t TARGETS -o | grep -q "image/png"; then
random=$(tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 16)
file="$DESTINATION/$random.png"
xclip -selection clipboard -t image/png -o > $file
echo "Image successfully saved as $random.png"
echo "![](<$file>)"
pasteToArea "![](<$file>)"
# replacing the new paste with old image
xclip -selection clipboard -t image/png -i "$file"
else
echo "Error: No image found in the clipboard!"
fullfilepath=$(xclip -selection clipboard -o)
filename=$(basename -- "$fullfilepath")
extension="${filename##*.}"
filename_with_noext="${filename%.*}"
file="$DESTINATION/$filename_with_noext $(date +%s).$extension"
if [[ $mode == "alt" ]]; then
pasteToArea "[$filename](<$fullfilepath>)"
# replacing the new paste with old one
echo -n "$fullfilepath" | xclip -selection clipboard
exit 0
fi
cp "$fullfilepath" "$file"
echo "[$filename](<$file>)"
pasteToArea "[$filename](<$file>)"
# replacing the new paste with old one
echo -n "$fullfilepath" | xclip -selection clipboard
fi
```
this will have absolute paths which can be resolved by adding a script on save in zed settings.jsonc file
```json
"languages": {
"Markdown": {
"format_on_save": "on",
"formatter": {
"external": {
"command": "python3",
"arguments": [
"-c",
"import sys, re, os\n\ncurrent_dir = os.path.dirname('{buffer_path}')\npattern = re.compile(r'(\\!?\\[.*?\\]\\()([^\\)]+)(\\))')\n\ndef replacer(match):\n prefix, path, suffix = match.groups()\n p = path.strip('<>')\n if os.path.isabs(p) and os.path.exists(p):\n return f'{prefix}{os.path.relpath(p, current_dir)}{suffix}'\n return match.group(0)\n\ntext = sys.stdin.read()\nsys.stdout.write(pattern.sub(replacer, text))"
]
}
}
}
}
```

View file

@ -0,0 +1,238 @@
installing software
for brave
```sh
sudo apt install curl
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
sudo apt update
sudo apt install brave-browser
```
for vlc
`sudo apt install vlc`
librewolf
```sh
sudo apt update && sudo apt install extrepo -y
sudo extrepo enable librewolf
sudo apt update && sudo apt install librewolf -y
```
haruna
`sudo apt install haruna`
### similarly
similarly htop, mpv,btop,qutebrowser, micro,tmux, lsd, ark , qbittorent,thunderbird , okular , flameshot , kazam, openjdk, riseupvpn , handbrake , vim , neovim , mariadb-server , copyq
installed protonvpn through
`flatpak install flathub com.protonvpn.www`
to remove it
`flatpak uninstall flathub com.protonvpn.www`
and to list packages
`flatpak list`
this wasnt working so using openvpn
Get OpenVPN config files from Proton VPN:
Go to https://account.protonvpn.com/downloads
Scroll to OpenVPN Configuration Files section
Choose your platform:
Platform: Linux
Protocol: UDP or TCP (UDP is faster)
Download config(s) for the server(s) you want (e.g. JP-FREE.ovpn, US-FREE.ovpn)
3. Import the .ovpn file into NetworkManager:
Open Network Manager:
Click the network icon in your Cinnamon panel
Choose Network Settings
Click the + to add a new VPN
Choose Import from file...
Select the .ovpn file you downloaded
Enter your Proton VPN credentials:
Username and password (from your Proton VPN account dashboard, under OpenVPN / WireGuard login — these are different from your Proton email/password!)
Save & connect.
&nbsp;
**best method is to use wireguard**
1. download wiregard profiles from https://account.protonvpn.com/downloads
2. install wireguard-tools and then copy that conf files to `/etc/wireguard`
3. run `sudo wg-quick up <conf_name>` (without .conf at end)
4. to disconnect `sudo wg-quick down <conf_name>`
Note : in proton config files, it is configured such that browsers cant access it so make changes in conf files like this
`AllowedIPs = 0.0.0.0/0, ::/0` to allow all network traffic
&nbsp;
dev tools
python3-pip, git,
other tools
tldr,live-server, surge through npm,
programs installed
xdm ,
fastfetch
by
```sh
sudo add-apt-repository ppa:zhangsongcui3371/fastfetch
sudo apt update
sudo apt install fastfetch
```
keepaasxc by
```sh
sudo add-apt-repository ppa:phoerious/keepassxc
sudo apt update
sudo apt install keepassxc
```
kooha by flathub
```sh
flatpak install flathub io.github.seadve.Kooha
# then
flatpak run io.github.seadve.Kooha
```
raider through flathub
`flatpak install flathub com.github.ADBeveridge.Raider`
**android studio** by downloading its `android-studio-2024.3.2.14-linux.tar.gz` file from their page and then moved that extracted folder to `/usr/local` and then running ./studio from that location which wuld be under bin of that folder.
signal
```sh
# NOTE: These instructions only work for 64-bit Debian-based
# Linux distributions such as Ubuntu, Mint etc.
# 1. Install our official public software signing key:
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
# 2. Add our repository to your list of repositories:
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
sudo tee /etc/apt/sources.list.d/signal-xenial.list
# 3. Update your package database and install Signal:
sudo apt update && sudo apt install signal-desktop
```
&nbsp;
sublime text 3
```sh
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt update
sudo apt install sublime-text
```
throium deb through official site, simlar tor-browser binary, xdm through downloading zip file and installing it with script : xdman, dua through binary zip
&nbsp;
**video-downloader** (gui for yt-dlp) : https://github.com/Unrud/video-downloader
instaling dependencies
` sudo apt install ffmpeg libadwaita-1-0 yt-dlp meson build-essential libglib2.0-dev cmake librsvg2-bin libadwaita-1-dev libgtk-4-dev`
steps
```sh
git clone https://github.com/Unrud/video-downloader.git
cd video-downloader
meson setup build --prefix=$HOME/video-downloader
ninja -C build
ninja -C build install
```
now glibschema needs to be setup too
first copy data folder of project to ~/video-downloader then generate compiled version of this
```sh
glib-compile-schemas ~/video-downloader/data
```
or better yet
```sh
mkdir -p ~/.local/share/glib-2.0/schemas/
cp build/data/com.github.unrud.VideoDownloader.gschema.xml ~/.local/share/glib-2.0/schemas/
glib-compile-schemas ~/.local/share/glib-2.0/schemas/
```
&nbsp;
redis
```sh
sudo apt-get install lsb-release curl gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
```
&nbsp;
mongodb
```sh
sudo apt-get install gnupg curl
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
--dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list
sudo apt-get update && sudo apt-get install mongodb-org
```
finally enable it
`sudo systemctl start mongod`
&nbsp;
cloudflare warp
```sh
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(. /etc/os-release && printf $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
apt update && apt install cloudflare-warp
```
&nbsp;
calligra
now i3
`apt install i3`
&nbsp;
installing tailscale
https://tailscale.com/docs/install/linux
`curl -fsSL https://tailscale.com/install.sh | sh`
to start tailscale and enable ssh with it
`sudo tailscale up --ssh`
installing openssh
`sudo apt install openssh-server`

View file

@ -0,0 +1,230 @@
basics
Absolutely — using **Nix** on Debian can give you a powerful, AUR-like experience with access to thousands of packages, isolated environments, and even rollbacks. It’s a different mindset than `apt`, but super powerful once you get the hang of it.
---
## 🧰 What Is Nix?
Nix is a **purely functional package manager**:
* Installs packages **without interfering** with your system.
* Supports **per-user installs** — no sudo needed for most things.
* Enables **isolated dev environments**, rollbacks, and reproducibility.
---
## 🧱 Step-by-Step: Installing and Using Nix on Debian
### 🔹 1. **Install Nix**
Run this script (official installer):
```bash
curl -L https://nixos.org/nix/install | sh
```
> ✅ After installation, either restart your shell or run:
```bash
. ~/.nix-profile/etc/profile.d/nix.sh
```
---
### 🔹 2. **Install a Package (like `hello`)**
```bash
nix-env -iA nixpkgs.hello
```
> This installs the `hello` program into your **user profile** — no sudo needed.
You can run it immediately:
```bash
hello
```
---
### 🔹 3. **Search for Packages**
```bash
nix search nixpkgs firefox
```
Or use the web search: [https://search.nixos.org/packages](https://search.nixos.org/packages)
---
### 🔹 4. **Upgrade Installed Packages**
```bash
nix-env --upgrade
```
---
### 🔹 5. **Remove a Package**
```bash
nix-env -e hello
```
---
## 🧪 Bonus: Reproducible Dev Environments (`shell.nix`)
Make a file named `shell.nix`:
```nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.git
pkgs.nodejs
pkgs.python3
];
}
```
Then run:
```bash
nix-shell
```
This drops you into an environment with only those tools installed — perfect for development!
---
## 🔐 Is It Safe?
Yes — it’s **sandboxed**, doesn't touch your global system files, and is trusted by many in the DevOps/Dev world.
---
## ⚠️ Things to Know
* It uses a **huge store** (`/nix/store`) — so expect some disk usage.
* It can be a **learning curve**, but well worth it if you want reproducibility or project-based environments.
* You can uninstall Nix any time with `nix-env --uninstall` or delete `/nix`.
---
Want to try installing a specific package with Nix now, or explore using `home-manager` for managing your full dotfiles setup?
&nbsp;
**Installing packages**
To install **Brave** using **Nix**, you have a couple of options depending on how you want to use it (system-wide, user profile, or temporary). Here's how to do it:
---
## 🦁 Option 1: Install Brave to Your User Profile (Permanent)
First, search for it:
```bash
nix search nixpkgs brave
```
You should see a result like:
```text
brave # A privacy-focused web browser
```
Then install it:
```bash
nix-env -iA nixpkgs.brave
```
✅ This makes `brave` available permanently in your user environment.
---
## ⚡ Option 2: Use `nix shell` (Temporary)
If you just want to **run Brave without installing**:
```bash
nix shell nixpkgs#brave
```
This will drop you into a shell where `brave` is available. You can launch it:
```bash
brave
```
When you exit the shell, it's gone — no clutter!
---
## 🔥 Option 3: Use `nix run` (One-off Execution)
To run Brave **directly**:
```bash
nix run nixpkgs#brave
```
---
## 📦 Bonus: Use `home-manager` (for managing user packages declaratively)
If you're managing your dotfiles/config with Nix, you can declare Brave in your `home.nix` like this:
```nix
{
home.packages = with pkgs; [
brave
];
}
```
Then just run `home-manager switch`.
---
Would you like help setting up `home-manager` too? It's great if you're building a Nix-based setup.
&nbsp;
for enabling expermimental feature which is required for search and install packages
```sh
sudo mkdir -p /etc/nix
sudo nano /etc/nix/nix.conf
```
then add following
```txt
experimental-features = nix-command flakes
```
&nbsp;
to remove packages
if installed with nix-env
```sh
nix-env -e brave
```
and then
for removing unused packages
```sh
nix-collect-garbage
```
for older generations:
```sh
nix-collect-garbage -d
```

View file

@ -0,0 +1,15 @@
repair grub after installing windows
https://www.youtube.com/watch?v=Zr9oyWjD6IA
https://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows
1. use ` sudo fdisk -l` to find efi and main linux partition
2. Mount linux partition to mnt. `sudo mount /dev/sdxy .mnt` and then mount efi partition to `/mnt/boot/efi`. `sudo mount /dev/sdab .mnt/boot/efi`.
3. chroot to /mnt to access linux partition and then `update-grub`. Though most probably have to do this step too `grub-install /dev/sda` sda here but it have to be the drive where efi is installed
4. finally exit and reboot
and if installed distri is arch based then
while in chroot do following
`grub-mkconfig -o /boot/grub/grub.cfg`
then
`grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB`