From 3800fc8494c58595cc1964e8d5ba211605f1c7fe Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Wed, 19 Nov 2025 21:21:34 +0100 Subject: [PATCH] revise readme --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7720a3c..ff1a0f5 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,12 @@ Flake-based NixOS configuration with home-manager. ### Daily Use ```bash # System rebuild -sudo nixos-rebuild switch --flake .# +sudo nixos-rebuild switch --flake .# # NixOS +sudo darwin-rebuild switch --flake .# # Nix-darwin # or use alias: oss # Home Manager -home-manager switch --flake .#yanlin@ +home-manager switch --flake .#@ # or use alias: hms # the full switch alias `fs` will perform system rebuild then home manager switch @@ -22,12 +23,12 @@ nix flake update ### New Host Installation ```bash # For NixOS and disko -sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --flake .# +sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko --flake github:Logan-Lin/nix-config# sudo nixos-install --flake .# # For nix-darwin -sudo nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake ~/.config/nix# -nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake ~/.config/nix#@ +sudo nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake github:Logan-Lin/nix-config# +nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake github:Logan-Lin/nix-config#@ ``` ### Occasional Commands @@ -45,9 +46,6 @@ nix search nixpkgs # Rollback sudo nixos-rebuild switch --rollback - -# Build without switching -nixos-rebuild build --flake .# ``` ## Structure @@ -56,7 +54,11 @@ nixos-rebuild build --flake .# . ├── flake.nix # Entry point ├── hosts/ -│ └── nixos/ # NixOS configurations +│ ├── nixos/ # NixOS configurations +│ │ ├── system-default.nix +│ │ ├── home-default.nix +│ │ └── / +│ └── darwin/ # Nix-darwin configurations │ ├── system-default.nix │ ├── home-default.nix │ └── / @@ -75,6 +77,7 @@ nixos-rebuild build --flake .# - `oss` - Rebuild NixOS system - `cdf` - Interactive file search with cd - `pwdf` - Get file path interactively +- `fm` - Open current directory in GUI file manager ### Tmux Reminders - Prefix: `Ctrl-a` @@ -82,7 +85,7 @@ nixos-rebuild build --flake .# - Navigate: `hjkl` - Resize: `HJKL` -## Service Management (NixOS) +## Service Management ```bash # Container services