NixOS as a desktop/pt: Difference between revisions

Cybergui (talk | contribs)
Created page with "=== Guia em Video ==="
Tags: Mobile edit Mobile web edit
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
(23 intermediate revisions by one other user not shown)
Line 1: Line 1:
<languages/>
<languages/>
<div class="mw-translate-fuzzy">
O NixOS pode ser usado para diversas finalidades. Se você deseja usá-lo como sistema operacional de desktop principal para seu uso diário. Esta página é para você. Mesmo que sua ambição seja usar o NixOS na nuvem ou em servidores especialmente configurados, você pode começar com as lições descritas aqui para se familiarizar mais amplamente com o ecossistema Nix.
O NixOS pode ser usado para diversas finalidades. Se você deseja usá-lo como sistema operacional de desktop principal para seu uso diário. Esta página é para você. Mesmo que sua ambição seja usar o NixOS na nuvem ou em servidores especialmente configurados, você pode começar com as lições descritas aqui para se familiarizar mais amplamente com o ecossistema Nix.
</div>


<span id="Installation"></span>
<span id="Installation"></span>
== Instalação ==
== Instalação ==


<span id="Wiki_method"></span>
<div class="mw-translate-fuzzy">
=== Metodo Wiki ===
Se preferir ler, veja [[NixOS Installation Guide]] Para começar. Para uma opção de vídeo bem apresentada, veja a seção de guia de vídeo logo abaixo. Lembre-se de que, para uma instalação em desktop, você provavelmente precisará começar com pelo menos 30 GiB de espaço em disco disponível para os ambientes de desktop (por exemplo, GNOME, KDE ou XFCE), navegadores (por exemplo, Firefox) e outros aplicativos gráficos (por exemplo, VSCode) que seriam típicos de uso diário. 15 GiB podem ser suficientes para uma configuração bastante básica.
</div>
 
<span id="Managing_your_configuration"></span>
== Gerenciando sua configuração ==
 
<div class="mw-translate-fuzzy">
É possível gerenciar toda a sua configuração usando os métodos documentados no [https://nixos.org/manual/nixos/stable/index.html NixOS official manual]. No entanto, a maioria dos membros da comunidade que usam o NixOS no desktop preferem gerenciar suas configurações de usuário usando (e.g. "dotfiles") [[Home Manager]] (citação necessária). O Home Manager é uma ferramenta orientada ao usuário para declarar o que você deseja instalar e como deseja configurá-lo e, portanto, seria usado no lugar da maioria das configurações que você normalmente colocaria em um [https://nixos.org/manual/nixos/stable/#sec-changing-config configuration.nix] ou através [[FAQ#How_can_I_manage_software_with_nix-env_like_with_configuration.nix.3F|nix-env]]
</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>


Se preferir ler, veja [[NixOS Installation Guide]] Para começar. Para uma opção de vídeo bem apresentada, veja a seção de guia de vídeo logo abaixo. Lembre-se de que, para uma instalação em desktop, você provavelmente precisará começar com pelo menos 30 GiB de espaço em disco disponível para os ambientes de desktop (por exemplo, GNOME, KDE ou XFCE), navegadores (por exemplo, Firefox) e outros aplicativos gráficos (por exemplo, VSCode) que seriam típicos de uso diário. 15 GiB podem ser suficientes para uma configuração bastante básica.
<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>


<span id="Video_guide"></span>
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Guia em Video ===
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">
<div lang="en" dir="ltr" class="mw-content-ltr">
For a visual guide, see [[Wil T Nix Guides]]. The [[Wil_T_Nix_Guides#NixOS_Installation_Guide|second video]] is a concise installation guide. This 8-part series, produced in early 2021, also covers all the basics of using NixOS as a desktop and configuring it to your liking.
Home Manager can be used independently of the system configuration and works with both traditional setups and newer [[Flakes]]-based configurations.
</div>
 
<span id="With_Flakes"></span>
=== Com Flakes ===
 
<div class="mw-translate-fuzzy">
Se você quer uma composição de Configuração do NixOS, ainda experimental [[Flakes]] está causando muita excitação na comunidade. Gerenciar flocos requer um bom entendimento básico e alguma experiência prática com o ecossistema Nix.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Managing your configuration ==
Refer to [[NixOS system configuration#Defining NixOS as a flake]] for details on getting started.
</div>
 
<span id="Beyond_initial_setup"></span>
== Além da configuração inicial ==
 
<div class="mw-translate-fuzzy">
Depois de se familiarizar com o ecossistema Nix e ter uma instalação funcional do NixOS para desktop, você provavelmente se interessará por personalizações e configurações mais detalhadas.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
It is possible to manage your entire configuration using the methods documented in the [https://nixos.org/manual/nixos/stable/index.html NixOS official manual]. However, most community members who use NixOS on the desktop prefer to manage their user configurations (e.g. "dotfiles") using [[Home Manager]] (citation needed). Home Manager is a user oriented tool for declaring what you want installed and how you want it configured, and thus would be used in lieu of most settings you would otherwise put into a [https://nixos.org/manual/nixos/stable/#sec-changing-config configuration.nix] or through [[FAQ#How_can_I_manage_software_with_nix-env_like_with_configuration.nix.3F|nix-env]]
Common configuration areas include:
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Video guide ===
==== Desktop Environments ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Wil T's guides are about an even mix of:
Install and configure full-featured environments such as [[GNOME]], [[KDE Plasma]], or [[Xfce]].
# Hands-on bootstrapping to get to being able to very capably manage your system using Home Manager, git versioning, and eventually Flakes.
# Conceptual overviews and general exposition of the Nix ecosystem, community, and available resources.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
The [[Wil_T_Nix_Guides#NixOS_Installation_Guide|second video]], starting from about 27 minutes in, is also an introduction to and guide to setting up Home Manager.
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">
== Modularizing your configuration ==
==== Window Managers ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== With NixOS Modules ===
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">
configuration.nix is an instance of a [[NixOS modules|NixOS module]], which makes it easy to break your configuration into several files. Modules can:
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">
* Import other modules
==== Display Managers (Login Managers) ====
* Declare new options
</div>  
* Provide values for options (this is what most of your default configuration.nix does)
 
* Reference option values from other modules (via the <code>config</code> attribute passed to all modules)
<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">
As long as you declare options for any values you want to share between modules, you can divide your configuration however you like into files that get imported, directly or transitively, by your root configuration.nix file. You can also import modules from remote sources, using functions like <code>builtins.fetchTarball</code>. See the [[NixOS modules|wiki page]] or the [https://nixos.org/manual/nixos/stable/#sec-writing-modules NixOS manual] for more information.
==== Audio Setup ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== With Flakes ===
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">
If you want a more composable<sup>[citation needed]</sup> NixOS configuration setup, the still-experimental [[Flakes]] feature is causing a lot of excitement in the community. Managing flakes requires a good basic understanding and some existing hands on experience with the Nix ecosystem.
==== Network Management ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Video guide ====
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">
Videos [[Wil_T_Nix_Guides#Intro_to_Flakes|seven]] and [[Wil_T_Nix_Guides#Moving_NixOS_System_Configuration_into_a_Flake|eight]] of Wil T's original 8-part series are a good overview of what Flakes enable and how to get started with them.
==== Bluetooth Support ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
== Beyond initial setup ==
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">
After you are familiar with the Nix ecosystem and have a functional desktop install of NixOS, you will likely be interested in customizations and more detailed setup.
==== Power Management ====
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
=== Learn by example ===
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">
If you are comfortable managing your system through a git repo using flakes, then there are many repositories you can learn from now!
==== Printing and Scanning ====
</div>  
</div>  


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
Check out [[Comparison of NixOS setups]] for a table comparing some popular choices.
Enable [[Cups]] for printer support and tools like Sane for [[Scanners|scanning]] devices.
</div>
 
<span id="Tips_and_tricks"></span>
<div class="mw-translate-fuzzy">
== Gerenciando sua configuração ==
</div>
 
<span id="Modularizing_your_configuration_with_modules"></span>
<div class="mw-translate-fuzzy">
=== Com os Modulos NixOS ===
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
See [[Configuration Collection]] for a long list within the wiki.
{{main|NixOS system configuration#Modularizing your configuration with modules}}
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="See_also"></span>
Additionally, the following topic searches on Github should uncover many useful examples.
<div class="mw-translate-fuzzy">
* [https://github.com/topics/nix-flake nix-flake]
=== Aprenda com exemplos ===
* [https://github.com/topics/nixos-configuration nixos-configuration]
</div>
* [https://github.com/topics/nixos-dotfiles nixos-dotfiles]
 
<div class="mw-translate-fuzzy">
Confira [[Comparison of NixOS setups]] para uma tabela comparando algumas opções populares.
</div>
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
[[Category:Desktop]]
[[Category:Desktop]]
[[Category:Guide]]
[[Category:Guide]]
[[Category:NixOS]]
</div>