Skip to content

yasinuslu/nepjua

Repository files navigation

Nepjua Nix Config

Getting Started

  1. Install Nix

MacOS Configuration

Applying Configuration

Execute this every time you make a change to the configuration

Default config is raiden, yours might change

nix run nix-darwin -- switch --flake .#$hostname

Linux Configuration

NixOS Configuration

Install the system

sudo nixos-rebuild switch --flake .#kaori

NixOS-WSL Configuration

Install the system

sudo nixos-rebuild switch --flake .#tristan --impure

Hetzner Cloud Configuration

Add this cloud-config:

#cloud-config

runcmd:
  - curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-unstable bash 2>&1 | tee /tmp/infect.log

Once the server is up, run:

nix-shell -p git
git clone https://github.com/yasinuslu/nix-config
cd nix-config
sudo nixos-rebuild switch --flake .#hetzner --impure

References

FAQ

How do I avoid github rate limiting?

First login:

gh auth login

Then set NIX_CONFIG environment variable

export NIX_CONFIG="extra-access-tokens = github.com=$(gh auth token -u yasinuslu)"

Or even better

alias nixt="NIX_CONFIG=\"extra-access-tokens = github.com=$(gh auth token -u yasinuslu)\" nix"
alias niv="NIX_CONFIG=\"extra-access-tokens = github.com=$(gh auth token -u yasinuslu)\" niv"

Personal Notes

Google Drive Mount

rclone mount gdrive: ~/rclone/gdrive --daemon --vfs-cache-mode full