[水] NixOS 19.03 正式支持 Pantheon 桌面环境

Pantheon 是 elementary OS 的默认桌面环境,曾被称为「最美桌面环境」。从版本 19.03 开始,NixOS 正式支持 Pantheon 桌面环境。

官方通告(英文)

In addition to numerous new and upgraded packages, this release has the following highlights:

Added the Pantheon desktop environment. It can be enabled through services.xserver.desktopManager.pantheon.enable.

注意事项(英文)

services.xserver.desktopManager.pantheon default enables lightdm as a display manager and using Pantheon’s greeter. This is because of limitations with the screenlocking implementation, whereas the screenlocker would be non-functional without it. Because of that it is recommended to retain this precaution, however if you’d like to change this set: services.xserver.displayManager.lightdm.enable, services.xserver.displayManager.lightdm.greeters.pantheon.enable to false and enable your preferred display manager.

安装

准备

NixOS 安装指南请移步:NixOS、Nix 安装与配置笔记

如果你在运行旧版本,请先升级到 19.03(一旦新版本发布,旧版本会在一个月内停止维护)。

使用管理员权限(下面同理)更换软件源:

nix-channel --add https://nixos.org/channels/nixos-19.03 nixos

升级系统:

nixos-rebuild switch --upgrade

将 Pantheon 加入系统软件包组中

编辑 /etc/nixos/coonfiguration.nix,添加以下内容:

services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
services.xserver.displayManager.lightdm.greeters.pantheon.enable = true;
services.pantheon.files.enable = true;

保存后运行 nixos-rebuild switch --upgrade 使设置生效。