Warning
Use at your own risk. It works for me, but it may not work for you. At least not without adjustments.
- Flake-based
- XFCE desktop environment
- BSPWM window manager
- Brave browser
- Kitty terminal
- Zsh shell
- etc.
-
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.
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:
# 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"# 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"