Skip to content

Add NixOS flake starter configuration with Home Manager#1

Open
watanany wants to merge 1 commit into
masterfrom
claude/nixos-flake-starter-config-9xpcA
Open

Add NixOS flake starter configuration with Home Manager#1
watanany wants to merge 1 commit into
masterfrom
claude/nixos-flake-starter-config-9xpcA

Conversation

@watanany
Copy link
Copy Markdown
Owner

Summary

This PR introduces a complete, beginner-friendly NixOS flake-based starter configuration with integrated Home Manager. The setup provides a minimal yet functional foundation that can be easily extended with additional features.

Key Changes

  • Flake structure (flake.nix): Declares inputs (nixpkgs, home-manager, nixos-hardware) and outputs for the nixos host configuration with proper specialArgs passing
  • System modules (modular design):
    • nix.nix: Enables flakes, experimental features, auto-optimization, and weekly garbage collection
    • boot.nix: Configures systemd-boot for UEFI with latest kernel
    • networking.nix: Sets up NetworkManager, firewall (SSH only), and OpenSSH with root login disabled
    • locale.nix: Configures Japanese locale (ja_JP.UTF-8), Asia/Tokyo timezone, jp106 keymap, and fcitx5-mozc IME
    • packages.nix: Provides system-wide essential tools (git, vim, ripgrep, fd, etc.)
    • users.nix: Defines watanany user with wheel/networkmanager groups and fish shell
  • Home Manager configuration (user environment):
    • shell.nix: Fish shell with starship prompt, direnv (nix-direnv), fzf, zoxide, and eza
    • git.nix: Git configuration with delta diff viewer
    • neovim.nix: Neovim as default editor with vi aliases
    • tmux.nix: Tmux with vi keybindings, C-a prefix, and mouse support
    • packages.nix: User-specific CLI tools (bat, jq, gh, lazygit, etc.)
  • Host configuration (hosts/nixos/): Machine-specific settings with placeholder hardware configuration
  • Comprehensive documentation (README.md): Setup instructions, daily operations, extension guides, and troubleshooting

Notable Implementation Details

  • Home Manager is integrated into NixOS configuration with useGlobalPkgs and useUserPackages enabled
  • Hardware configuration is intentionally left as a placeholder to be generated per-machine via nixos-generate-config
  • Modular design allows easy feature addition (desktop environments, audio, fonts, etc.) via new module files
  • Security defaults: SSH password auth enabled initially, root login disabled, firewall restrictive
  • Non-free packages allowed by default for broader hardware/software support
  • Comprehensive comments in Japanese and English for educational purposes

https://claude.ai/code/session_01BWGdkgXga4ZV7CSaNnECxj

Add a beginner-friendly, modular NixOS configuration under nixos/ with
flakes, Home Manager integration, Japanese locale, OpenSSH (root denied),
fish + starship + direnv, and common CLI tools (ripgrep, fd, bat, eza,
fzf, zoxide, gh, lazygit). System modules are split by concern so users
can add a desktop / audio / fonts module without touching existing files.

https://claude.ai/code/session_01BWGdkgXga4ZV7CSaNnECxj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants