nix-config

gvolpeApache-2.0活跃维护

一套用 Nix 和 Home Manager 管理的 NixOS 桌面配置,涵盖 Hyprland、Niri、Neovim、Fish 等组件,适合想复刻或参考声明式 Linux 环境的人。

:space_invader: NixOS configuration :space_invader:

v1.0.0发布于 2026-10-02 14:32 UTC1,118star +1 / 7 天80fork同步于 2026-11-10 23:51 UTC

怎么上手

由 README 提炼,执行前请确认
nixos-rebuild switch --flake github:gvolpe/nix-config#xmod
nixos-rebuild build-vm --flake github:gvolpe/nix-config#xmod
硬件要求按 README 说明

README 未说明具体硬件要求;配置面向 x86_64-linux,含 aorus、dell-xps、thinkpad-x1 三台机器的 NixOS 配置,其中 hardware-configuration.nix 来自特定机器扫描,未必适用于你的硬件

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

个人 NixOS 与 Home Manager 配置仓库,提供 niri、Hyprland、XMonad 三套桌面环境可复用配置

一套用 Nix 和 Home Manager 管理的 NixOS 桌面配置,涵盖 Hyprland、Niri、Neovim、Fish 等组件,适合想复刻或参考声明式 Linux 环境的人。

核心能力

  • 用 Flake 输出 nixosConfigurations 与 homeConfigurations
  • 内置 niri 滚动平铺 Wayland 桌面配置
  • 提供 Hyprland 与 XMonad 历史配置参考
  • 打包 neovim、metals、slack 等自定义包
  • 提供 mkHome、mkNixos 库函数与 overlays

容易踩的坑

hardware-configuration.nix 是特定机器的硬件扫描结果,直接套用可能不兼容你的机器;Home Manager 全新安装需先创建特定目录,否则需改用 nix build 方式构建 activationPackage;build-vm 的 QEMU 虚拟机在图形方面存在限制

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本v1.0.0
  1. v1.0.0v1.0.0 (Hyprland & XMonad)最新正式版2026-10-02 · 2026-10-02 14:32 UTC

    Last release with Hyprland and XMonad support. These will be removed from the main branch.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    :space_invader: NixOS Config :space_invader:

    ci-badge Home NixOS

    My current — and ever evolving — NixOS and Home Manager configurations.

    Niri

    An incredible scrollable-tiling Wayland compositor.

    niri

    TypeProgram
    EditorNeoVim
    LauncherFuzzel - Vicinae
    ShellFish
    Status BarWaybar
    TerminalKitty
    Window ManagerNiri
    File ManagerNemo
    NotificationsSway NC
    WallpapersHyprlax
    GTK ThemeJuno Ocean
    GTK Icon ThemeBeauty Line
    Terminal FontJetBrainsMono

    overview

    lockscreen

    swaylock

    swaync

    workspace

    workspace1

    nemo

    fuzzel

    vicinae

    wlogout

    hyprlax

    Hyprland

    My first Wayland compositor experience (see Release v1.0.0).

    hyprland

    TypeProgram
    EditorNeoVim
    LauncherWofi
    ShellFish
    Status BarWaybar
    TerminalFoot
    Window ManagerHyprland
    File ManagerNemo
    NotificationsDunst
    GTK ThemeJuno Ocean
    GTK Icon ThemeBeauty Line
    Terminal FontJetBrainsMono

    hyprlock

    floating

    btm

    nemo

    binds

    XMonad

    XMonad will be forever in my heart — the best X window manager! (see Release v1.0.0).

    neofetch

    TypeProgram
    EditorNeoVim
    LauncherRofi
    ShellFish
    Status BarPolybar
    TerminalAlacritty
    Window ManagerXMonad
    File ManagerNautilus
    NotificationsDunst
    GTK ThemeJuno Ocean
    GTK Icon ThemeBeauty Line
    Terminal FontJetBrainsMono

    cowsay

    scala-dev-env

    desktop

    themes

    demo

    NeoVim

    My NeoVim configuration lives here: https://github.com/gvolpe/mnw-flake

    Structure

    diagram

    Flake outputs

    $ dnix flake show --drv-names github:gvolpe/nix-config
    ├───devShells
    │   └───x86_64-linux
    │       └───default: development environment [nix-shell]
    ├───homeConfigurations
    │   ├───niri: Home Manager configuration [home-manager-generation]
    │   ├───niri-desktop: Home Manager configuration [home-manager-generation]
    │   └───niri-laptop: Home Manager configuration [home-manager-generation]
    ├───lib
    │   ├───mkHome: library function
    │   └───mkNixos: library function
    ├───nixosConfigurations
    │   ├───aorus: NixOS configuration [nixos-system-aorus-26.11.20260908.d6524aa]
    │   ├───dell-xps: NixOS configuration [nixos-system-dell-xps-26.11.20260908.d6524aa]
    │   └───thinkpad-x1: NixOS configuration [nixos-system-thinkpad-x1-26.11.20260908.d6524aa]
    ├───out
    │   ├───overlays: custom instance to be used by consumers of this flake
    │   └───pkgs: custom instance to be used by consumers of this flake
    └───packages
        └───x86_64-linux
            ├───bazecor: package [bazecor-1.10.0-patched]
            ├───metals: package [metals-1.6.7]
            ├───metals-updater: package [metals-updater-script]
            ├───neovim: package [neovim-0.12.5]
            ├───nix: package [determinate-nix-3.22.3]
            ├───quickemu: package [quickemu-4.9.9]
            └───slack: package [slack-4.51.180]
    

    As well as all the declared flake inputs.

    nix flake metadata github:gvolpe/nix-config
    

    Install

    The xmod configuration also contains my Home Manager configuration using the NixOS module, so it can easily be tested with a single command.

    nixos-rebuild switch --flake github:gvolpe/nix-config#xmod
    

    Or you can test it directly on a QEMU virtual machine, though it has its limitations in terms of graphics.

    nixos-rebuild build-vm --flake github:gvolpe/nix-config#xmod
    ./result/bin/run-xmod-amd-vm
    

    Having both NixOS and Home Manager configurations combined makes it easier to quickly install it on a new machine, but my preference is to have both separate, as my Home Manager configuration changes more often than that of the NixOS one, which can result in multiple (unwanted) generations at boot time.

    Managing the different Home Manager generations in isolation makes this way easier for me.

    NixOS

    The NixOS configuration can be installed by running the following command.

    nixos-rebuild switch --flake github:gvolpe/nix-config#thinkpad-x1
    

    Beware that the hardware-configuration.nix file is the result of the hardware scan of the specific machine and might not be suitable for yours.

    Home Manager

    A fresh install requires the creation of certain directories (see what the switch script does). However, if you omit those steps, the entire HM configuration can also be built as any other flake.

    nix build github:gvolpe/nix-config#homeConfigurations.niri-laptop.activationPackage
    result/activate
    

    Fresh install

    To set up a new machine from scratch, have a look at this document.

    LICENSE

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.