Skip to content

cybardev/nixos-dotfiles

Repository files navigation

NixOS Dotfiles

My Personal NixOS Config

Note

Use at your own risk. It works for me, but it may or may not work for you.


Modules

  • configuration.nix

    System config: I don't usually modify unless I want something done system-wide rather than for my user.

  • hardware-configuration.nix

    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.nix

    home-manager config: home-manager related config goes here. Also whatever files need to be directly sourced to somewhere in the HOME directory (like a neovim config for which I have a separate repository).

  • bspwm.nix

    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)
  • packages/pkgslist.nix

    List of packages to install: Software to install that need no further configuration.

  • packages/utils.nix

    Utility packages: Small utility programs that need some configuration (like Git, cava, etc.).

  • packages/zshrc.nix

    Z-shell config: Declarative equivalent of a .zshrc file, in the Nix language.

  • packages/kitty.nix

    Kitty terminal config: Configure the Kitty terminal emulator in Nix.

  • packages/vscode.nix

    Visual Studio Code config: Configure VS Code text editor in Nix.

  • packages/yazi.nix

    Yazi (TUI file manager) config: Configure the yazi file manager in Nix.

  • packages/ptpython.nix

    ptpython package: Custom Nix package for ptpython - a Python interpreter with various convenience features like inline documentation, syntax highlighting, modal editing, etc. Source: prompt-toolkit/ptpython

  • packages/cutefetch.nix

    cutefetch package: Custom Nix package for my cutefetch program - a minimalistic sysinfo fetch script featuring cute animals. Source: cybardev/cutefetch

  • packages/ytgo.nix

    ytgo package: Custom Nix package for my ytgo program - a terminal media player which I mainly use for background music while coding. Source: cybardev/ytgo


Installation

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)
  1. Clone into ~/.config

    git clone "https://github.com/cybardev/nixos-dotfiles.git" ~/.config/nixos
  2. Make backup of current config

    sudo mv /etc/nixos /etc/nixos.bak
  3. Soft-link to NixOS config directory

    sudo ln -s $HOME/.config/nixos /etc/nixos
  4. Replace hardware-configuration.nix with one appropriate for your system

    mv ~/.config/nixos/hardware-configuration.nix ~/.config/nixos/hardware-configuration.nix.bak
    cp /etc/nixos.bak/hardware-configuration.nix ~/.config/nixos/
  5. Add the home-manager channel

    sudo nix-channel --add "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz" home-manager
  6. [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 to system-surface.nix in configuration.nix

  7. Update added channel(s)

    sudo nix-channel --update
  8. Rebuild system from new config

    sudo nixos-rebuild switch

Screenshots

NixOS Screenshot, showing desktop with flower background and XFCE panels NixOS Screenshot, showing 3 windows of Kitty terminal in BSPWM NixOS Screenshot, showing logoff dialog