1
2024-11-08 12:47:07 +05:30
2024-06-25 15:59:54 +05:30
2024-11-08 12:47:07 +05:30
2024-11-08 12:47:07 +05:30
2023-07-08 08:40:01 +05:30
2024-11-08 12:47:06 +05:30
2024-11-08 12:47:06 +05:30

Dotfiles

NixOS configuration files personalized for my daily driver and home server.

Work Computer

To get started, install NixOS, enable flakes and clone this repository.

git clone https://github.com/lavafroth/dotfiles
sudo nixos-rebuild switch --flake dotfiles#cafe-nosecureboot

Secureboot

To enable secureboot, use the preinstalled sbctl command to generate your keys, clear the manufacturer keys and enroll yours as described here.

Note: My system did not require enrolling Microsoft keys alongside my own. However, your setup might break if you do not include the Microsoft keys. Classic case of Microsoft being a jerk.

Once the keys are enrolled, run the following to rebuild the system from now on

sudo nixos-rebuild switch --flake dotfiles

Sponsorblock for mpv

Optionally, if you want to block sponsors in mpv, run

pushd dotfiles/hosts/default/sources/mpv-sponsorblock
mkdir dotfiles/hosts/default/sources/mpv/scripts
nix build
cp result/lib/libmpv_sponsorblock.so ../mpv/scripts/sponsorblock.so
popd

followed by another rebuild.

Home Server

Install NixOS with the headless (no GUI) settings. Enable flakes. Clone this repo, enter the directory and run a rebuild for the host rahu.

git clone https://github.com/lavafroth/dotfiles
sudo nixos-rebuild switch --flake dotfiles#rahu

Android (Nix-on-droid)

I use Nix-on-droid to have Termux with a declarative config. Install Nix-on-droid from F-Droid and enable flakes when prompted. Clone this repo and rebuild the environment.

git clone https://github.com/lavafroth/dotfiles
nix-on-droid switch --flake dotfiles

Troubleshooting

command-not-found unable to connect to database

The programs.sqlite is only generated for the nixos- prefixed channels. The Nix flake in this repo uses the unstable channel. Thus, you must add them.

Run the following as root:

nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nix-channel --update

Further reading: NixOS discourse.

Known Nvidia issues

Nvidia CUDA shell does not identify the correct GPU

The nvidia_uvm kernel module is not loaded by default. Solved by adding it to boot.kernelModules.

Further reading: Nixpkgs issues

Running blender with CUDA

nix run --impure github:guibou/nixGL -- nix run blender-bin
Description
No description provided
Readme MIT 18 MiB
Languages
Nix 99.1%
Shell 0.7%
CSS 0.2%