NixOS as a desktop/ja: Difference between revisions
Haruki7049 (talk | contribs) Created page with "== インストール ==" |
Created page with "== 構成の管理 ==" |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<languages/> | <languages/> | ||
[[NixOS]]は、幅広い用途に適した汎用性の高いOSです。 | |||
このページでは、NixOSをメインのデスクトップ環境として実機またはVM上で実行したいユーザーを対象としています。 | |||
また、[[NixOS friendly hosters|クラウド]]環境やサーバーインフラとしてNixOSを導入する場合でも、より広範な[[Nix ecosystem|Nixエコシステム]]を理解するにはここで紹介する概念と実践は役立つでしょう。 | |||
<span id="Installation"></span> | |||
== インストール == | |||
インストールするには、[[NixOS Installation Guide|NixOSインストールガイド]]を参照して下さい。 | |||
デスクトップインストールをする場合は、[[:Category:Desktop environment|デスクトップ環境]]、[[:Category:Web Browser|ウェブブラウザ]]、その他の[[:Category:Applications|GUIアプリケーション]]などの日常的に使用するアプリケーションに必要となるディスク用量として、少なくとも30GiBの空き容量を確保しておくことを推奨します。 | |||
必要最低限の機能を備えたセットアップであれば、15GiBで十分でしょう。 | |||
<span id="Managing_your_configuration"></span> | |||
== 構成の管理 == | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
NixOS | As described in the [[Overview of the NixOS Linux distribution#Declarative Configuration]], NixOS is designed to be configured declaratively. This means the entire system configuration, including installed packages, system services, kernel parameters, and user accounts is defined in configuration files, typically in <code>/etc/nixos/configuration.nix</code>. These settings can then be applied consistently and reproducibly across machines. | ||
</div> | </div> | ||
< | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== | The process for managing your configuration is documented in the {{NixOS Manual|name=NixOS official manual|anchor=#ch-configuration}}. | ||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=== System Configuration === | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
{{main|NixOS system configuration}} | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
The primary configuration file, <code>/etc/nixos/configuration.nix</code>, defines system-wide settings. This includes options like enabling services, managing system users, setting hardware options, and specifying installed packages. Changes are applied with: | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
<syntaxhighlight lang="console"> | |||
# nixos-rebuild switch | |||
</syntaxhighlight> | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=== User configuration with Home Manager === | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
For managing per-user configurations such as application preferences, command-line tools, and dotfiles, [[Home Manager]] provides a convenient, declarative approach. It allows users to define which programs should be installed and how they should be configured, without needing to include those settings in the system-wide [https://nixos.org/manual/nixos/stable/#sec-changing-config configuration.nix]. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Home Manager can be used independently of the system configuration and works with both traditional setups and newer [[Flakes]]-based configurations. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
=== | === With Flakes === | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
For users looking for a more streamlined and reproducible way to manage NixOS configurations, the [[Flakes]] feature has been gaining popularity within the community. While Flakes introduce some new concepts compared to traditional workflows, many users find them a convenient and organized approach to managing system and development configurations. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Refer to [[NixOS system configuration#Defining NixOS as a flake]] for details on getting started. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== Beyond initial setup == | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Once your basic NixOS installation is complete and functional, you can further customize your system with a variety of optional configurations tailored for desktop use. For a list of recommended initial system configurations, see [[NixOS Installation Guide#NixOS configuration]]. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Common configuration areas include: | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
=== | ==== Desktop Environments ==== | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Install and configure full-featured environments such as [[GNOME]], [[KDE Plasma]], or [[Xfce]]. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
See [[:Category:Desktop environment]] for a full list. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
== | ==== Window Managers ==== | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Set up lightweight or tiling window managers like [[i3]], [[Sway]], [[Hyprland]], or [[xmonad]]. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
See [[:Category:Window managers]] for a full list. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Display Managers (Login Managers) ==== | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
Configure graphical session managers such as [[Gnome|GDM]], [[KDE|SDDM]], or [[LightDM]]. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Audio Setup ==== | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Enable and configure [[:Category:Audio|audio]] systems like [[PipeWire]], [[PulseAudio]], or [[ALSA]]. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Network Management ==== | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Use tools such as [[NetworkManager]] or [[systemd-networkd]] for managing [[Networking|network]] connections. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Bluetooth Support ==== | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Set up [[Bluetooth]] with blueman or other management tools. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Power Management ==== | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Configure [[laptop]] [[Power Management|battery management]], suspend, and hibernation with tools like [[Laptop#tlp|tlp]] or [[systemd]] services. | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
==== Printing and Scanning ==== | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Enable [[Cups]] for printer support and tools like Sane for [[Scanners|scanning]] devices. | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
== Tips and tricks == | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
=== Modularizing your configuration with modules === | |||
</div> | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
{{main|NixOS system configuration#Modularizing your configuration with modules}} | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
See | == See also == | ||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
* [[Overview of the NixOS Linux distribution]] | |||
* [https://github.com/topics/nix-flake nix-flake] | * [[Comparison of NixOS setups]] for a table comparing some popular choices. | ||
* [[Configuration Collection]] for a long list within the wiki. | |||
* [https://github.com/topics/nix-flake nix-flake], [https://github.com/topics/nixos-configuration nixos-configuration], [https://github.com/topics/nixos-dotfiles nixos-dotfiles] Github topics | |||
* [[Wil T Nix Guides]] Youtube video format guide | |||
</div> | </div> | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | |||
[[Category:Desktop]] | [[Category:Desktop]] | ||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:NixOS]] | |||
</div> | |||
Latest revision as of 01:30, 21 January 2026
NixOSは、幅広い用途に適した汎用性の高いOSです。 このページでは、NixOSをメインのデスクトップ環境として実機またはVM上で実行したいユーザーを対象としています。 また、クラウド環境やサーバーインフラとしてNixOSを導入する場合でも、より広範なNixエコシステムを理解するにはここで紹介する概念と実践は役立つでしょう。
インストール
インストールするには、NixOSインストールガイドを参照して下さい。 デスクトップインストールをする場合は、デスクトップ環境、ウェブブラウザ、その他のGUIアプリケーションなどの日常的に使用するアプリケーションに必要となるディスク用量として、少なくとも30GiBの空き容量を確保しておくことを推奨します。 必要最低限の機能を備えたセットアップであれば、15GiBで十分でしょう。
構成の管理
As described in the Overview of the NixOS Linux distribution#Declarative Configuration, NixOS is designed to be configured declaratively. This means the entire system configuration, including installed packages, system services, kernel parameters, and user accounts is defined in configuration files, typically in /etc/nixos/configuration.nix. These settings can then be applied consistently and reproducibly across machines.
The process for managing your configuration is documented in the NixOS official manual.
System Configuration
- Main article: NixOS system configuration
The primary configuration file, /etc/nixos/configuration.nix, defines system-wide settings. This includes options like enabling services, managing system users, setting hardware options, and specifying installed packages. Changes are applied with:
# nixos-rebuild switch
User configuration with Home Manager
For managing per-user configurations such as application preferences, command-line tools, and dotfiles, Home Manager provides a convenient, declarative approach. It allows users to define which programs should be installed and how they should be configured, without needing to include those settings in the system-wide configuration.nix.
Home Manager can be used independently of the system configuration and works with both traditional setups and newer Flakes-based configurations.
With Flakes
For users looking for a more streamlined and reproducible way to manage NixOS configurations, the Flakes feature has been gaining popularity within the community. While Flakes introduce some new concepts compared to traditional workflows, many users find them a convenient and organized approach to managing system and development configurations.
Refer to NixOS system configuration#Defining NixOS as a flake for details on getting started.
Beyond initial setup
Once your basic NixOS installation is complete and functional, you can further customize your system with a variety of optional configurations tailored for desktop use. For a list of recommended initial system configurations, see NixOS Installation Guide#NixOS configuration.
Common configuration areas include:
Desktop Environments
Install and configure full-featured environments such as GNOME, KDE Plasma, or Xfce.
See Category:Desktop environment for a full list.
Window Managers
See Category:Window managers for a full list.
Display Managers (Login Managers)
Audio Setup
Enable and configure audio systems like PipeWire, PulseAudio, or ALSA.
Network Management
Use tools such as NetworkManager or systemd-networkd for managing network connections.
Bluetooth Support
Set up Bluetooth with blueman or other management tools.
Power Management
Configure laptop battery management, suspend, and hibernation with tools like tlp or systemd services.
Printing and Scanning
Tips and tricks
Modularizing your configuration with modules
See also
- Overview of the NixOS Linux distribution
- Comparison of NixOS setups for a table comparing some popular choices.
- Configuration Collection for a long list within the wiki.
- nix-flake, nixos-configuration, nixos-dotfiles Github topics
- Wil T Nix Guides Youtube video format guide