Note
Use at your own risk. It works for me, but it may or may not work for you.
-
System config: I don't usually modify unless I want something done system-wide rather than for my user.
-
Hardware config: Created during system installation. Did not modify it since.
-
system.nix
|system-surface.nix
Device-specific config: Specify device hostname here. The
-surface
file is used in the installer script to build the Linux Surface kernel if desired. -
home-manager
config:home-manager
related config goes here. Also whatever files need to be directly sourced to somewhere in theHOME
directory (like aneovim
config for which I have a separate repository). -
BSPWM config: Window manager, startup programs, keybinds, themes, etc. configured here.
-
packages/
(directory)Installed software config: Install and configure various software for the user.
packages
submodules (click to expand)
-
List of packages to install: Software to install that need no further configuration.
-
Utility packages: Small utility programs that need some configuration (like Git, cava, etc.).
-
Z-shell config: Declarative equivalent of a
.zshrc
file, in the Nix language. -
Kitty terminal config: Configure the Kitty terminal emulator in Nix.
-
Visual Studio Code config: Configure VS Code text editor in Nix.
-
Yazi (TUI file manager) config: Configure the yazi file manager in Nix.
-
ptpython
package: Custom Nix package forptpython
- a Python interpreter with various convenience features like inline documentation, syntax highlighting, modal editing, etc. Source: prompt-toolkit/ptpython -
cutefetch
package: Custom Nix package for mycutefetch
program - a minimalistic sysinfo fetch script featuring cute animals. Source: cybardev/cutefetch -
ytgo
package: Custom Nix package for myytgo
program - a terminal media player which I mainly use for background music while coding. Source: cybardev/ytgo
Note
Run export SURFACE_KERNEL=1
before running the following script if you’re using a Surface device.
Run the install.sh script:
curl -sS "https://raw.githubusercontent.com/cybardev/nixos-dotfiles/refs/heads/main/install.sh" | bash -e
Individual installation steps (click to expand)
-
Clone into
~/.config
git clone "https://github.com/cybardev/nixos-dotfiles.git" ~/.config/nixos
-
Make backup of current config
sudo mv /etc/nixos /etc/nixos.bak
-
Soft-link to NixOS config directory
sudo ln -s $HOME/.config/nixos /etc/nixos
-
Replace
hardware-configuration.nix
with one appropriate for your systemmv ~/.config/nixos/hardware-configuration.nix ~/.config/nixos/hardware-configuration.nix.bak cp /etc/nixos.bak/hardware-configuration.nix ~/.config/nixos/
-
Add the
home-manager
channelsudo nix-channel --add "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz" home-manager
-
[OPTIONAL] Enable
linux-surface
kernel (if you have a Surface device)-
Add the
nixos-hardware
channel:sudo nix-channel --add "https://github.com/NixOS/nixos-hardware/archive/b12e314726a4226298fe82776b4baeaa7bcf3dcd.tar.gz" nixos-hardware
-
Use Surface-specific configuration file:
Change the
system.nix
import tosystem-surface.nix
inconfiguration.nix
-
-
Update added channel(s)
sudo nix-channel --update
-
Rebuild system from new config
sudo nixos-rebuild switch