Thanks to visit codestin.com
Credit goes to github.com

Skip to content

cybardev/nix-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Dotfiles

My Personal Nix Config

Warning

Use at your own risk. It works for me, but it may not work for you. At least not without adjustments.


Features

  • Flake-based
  • XFCE desktop environment
  • BSPWM window manager
  • Brave browser
  • Kitty terminal
  • Zsh shell
  • etc.

Components

  • flake.nix

    Config entrypoint: This flake contains a darwin config and a linux config. Modify username, hostname, and Nix config directory here.

  • sys/ (directory)

    System configs: Configure various system components, like home-manager, unfree software, system-wide packages, etc.

  • mod/ (directory)

    Modules: Configuration modules. See NixOS Manual: Writing NixOS Modules.

  • pkg/ (directory)

    Package configs: Install and configure various software for the user.

  • cfg/ (directory)

    Configs: Manage non-Nix configuration files.


Installation

Edit flake.nix to change username and hostname, and change config location to the local clone of this repo and export that path using export NIXOS_CONFIG_DIR="<path/to/clone>". Then depending on your platform, run the following lines:

NixOS

# use autogenerated hardware config instead of cloned one
mv "$NIXOS_CONFIG_DIR/sys/hardware-configuration.nix" "$NIXOS_CONFIG_DIR/sys/hardware-configuration.nix.bak"
cp "/etc/nixos/hardware-configuration.nix" "$NIXOS_CONFIG_DIR/sys/"

# rebuild system from config
sudo -H nixos-rebuild --experimental-features "nix-command flakes" switch --flake "$NIXOS_CONFIG_DIR"
nix run home-manager/master -- switch --flake "$NIXOS_CONFIG_DIR"

macOS

# rebuild system from config
nix --experimental-features "nix-command flakes" run nix-darwin/master#darwin-rebuild -- switch --flake "$NIXOS_CONFIG_DIR"
nix run home-manager/master -- switch --flake "$NIXOS_CONFIG_DIR"

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