NixOS as a desktop: Difference between revisions
m update flake link to new page |
Marked this version for translation Tags: Mobile edit Mobile web edit |
||
| Line 14: | Line 14: | ||
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. | 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. | ||
<!--T:28--> | |||
The process for managing your configuration is documented in the {{NixOS Manual|name=NixOS official manual|anchor=#ch-configuration}}. | The process for managing your configuration is documented in the {{NixOS Manual|name=NixOS official manual|anchor=#ch-configuration}}. | ||
=== System Configuration === | === System Configuration === <!--T:29--> | ||
<!--T:30--> | |||
{{main|NixOS system configuration}} | {{main|NixOS system configuration}} | ||
<!--T:31--> | |||
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: | 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: | ||
<!--T:32--> | |||
<syntaxhighlight lang="console"> | <syntaxhighlight lang="console"> | ||
# nixos-rebuild switch | # nixos-rebuild switch | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== User configuration with Home Manager === | === User configuration with Home Manager === <!--T:33--> | ||
<!--T:34--> | |||
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]. | 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]. | ||
<!--T:35--> | |||
Home Manager can be used independently of the system configuration and works with both traditional setups and newer [[Flakes]]-based configurations. | Home Manager can be used independently of the system configuration and works with both traditional setups and newer [[Flakes]]-based configurations. | ||
| Line 37: | Line 43: | ||
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. | 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. | ||
<!--T:36--> | |||
Refer to [[NixOS system configuration#Defining NixOS as a flake]] for details on getting started. | Refer to [[NixOS system configuration#Defining NixOS as a flake]] for details on getting started. | ||
| Line 44: | Line 51: | ||
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]]. | 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]]. | ||
<!--T:37--> | |||
Common configuration areas include: | Common configuration areas include: | ||
==== Desktop Environments ==== | ==== Desktop Environments ==== <!--T:38--> | ||
<!--T:39--> | |||
Install and configure full-featured environments such as [[GNOME]], [[KDE Plasma]], or [[Xfce]]. | Install and configure full-featured environments such as [[GNOME]], [[KDE Plasma]], or [[Xfce]]. | ||
<!--T:40--> | |||
See [[:Category:Desktop environment]] for a full list. | See [[:Category:Desktop environment]] for a full list. | ||
==== Window Managers ==== | ==== Window Managers ==== <!--T:41--> | ||
<!--T:42--> | |||
Set up lightweight or tiling window managers like [[i3]], [[Sway]], [[Hyprland]], or [[xmonad]]. | Set up lightweight or tiling window managers like [[i3]], [[Sway]], [[Hyprland]], or [[xmonad]]. | ||
<!--T:43--> | |||
See [[:Category:Window managers]] for a full list. | See [[:Category:Window managers]] for a full list. | ||
==== Display Managers (Login Managers) ==== | ==== Display Managers (Login Managers) ==== <!--T:44--> | ||
<!--T:45--> | |||
Configure graphical session managers such as [[Gnome|GDM]], [[KDE|SDDM]], or [[LightDM]]. | Configure graphical session managers such as [[Gnome|GDM]], [[KDE|SDDM]], or [[LightDM]]. | ||
==== Audio Setup ==== | ==== Audio Setup ==== <!--T:46--> | ||
<!--T:47--> | |||
Enable and configure [[:Category:Audio|audio]] systems like [[PipeWire]], [[PulseAudio]], or [[ALSA]]. | Enable and configure [[:Category:Audio|audio]] systems like [[PipeWire]], [[PulseAudio]], or [[ALSA]]. | ||
==== Network Management ==== | ==== Network Management ==== <!--T:48--> | ||
<!--T:49--> | |||
Use tools such as [[NetworkManager]] or [[systemd-networkd]] for managing [[Networking|network]] connections. | Use tools such as [[NetworkManager]] or [[systemd-networkd]] for managing [[Networking|network]] connections. | ||
==== Bluetooth Support ==== | ==== Bluetooth Support ==== <!--T:50--> | ||
<!--T:51--> | |||
Set up [[Bluetooth]] with blueman or other management tools. | Set up [[Bluetooth]] with blueman or other management tools. | ||
==== Power Management ==== | ==== Power Management ==== <!--T:52--> | ||
<!--T:53--> | |||
Configure [[laptop]] [[Power Management|battery management]], suspend, and hibernation with tools like [[Laptop#tlp|tlp]] or [[systemd]] services. | Configure [[laptop]] [[Power Management|battery management]], suspend, and hibernation with tools like [[Laptop#tlp|tlp]] or [[systemd]] services. | ||
==== Printing and Scanning ==== | ==== Printing and Scanning ==== <!--T:54--> | ||
<!--T:55--> | |||
Enable [[Cups]] for printer support and tools like Sane for [[Scanners|scanning]] devices. | Enable [[Cups]] for printer support and tools like Sane for [[Scanners|scanning]] devices. | ||
| Line 86: | Line 104: | ||
=== Modularizing your configuration with modules === <!--T:13--> | === Modularizing your configuration with modules === <!--T:13--> | ||
<!--T:56--> | |||
{{main|NixOS system configuration#Modularizing your configuration with modules}} | {{main|NixOS system configuration#Modularizing your configuration with modules}} | ||
| Line 97: | Line 116: | ||
* [[Wil T Nix Guides]] Youtube video format guide | * [[Wil T Nix Guides]] Youtube video format guide | ||
<!--T:57--> | |||
[[Category:Desktop]] | [[Category:Desktop]] | ||
[[Category:Guide]] | [[Category:Guide]] | ||
[[Category:NixOS]] | [[Category:NixOS]] | ||
</translate> | </translate> | ||