Files
whc-nixos/flake.nix
T
WHC cf6e2a1a48 feat: 新增 laptop 主机配置(Ultra 9 285H / Arc)
- hosts/laptop/hardware.nix: 本机真实硬件配置(btrfs 子卷 / NPU / 微码)
- hosts/laptop/default.nix: 复用 common/desktop-plasma/chinese/gaming/printing/apps,跳过 nvidia 与 fpga;加 Intel Arc VA-API
- flake.nix: 抽出 mkSystem,新增 nixosConfigurations.laptop / nixos
2026-09-21 23:45:25 +08:00

29 lines
808 B
Nix

{
description = "whc NixOS — desktop (i7-12700F + RTX 4060) + laptop (Ultra 9 285H / Arc)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
mkSystem = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ (./hosts + "/${host}") ];
};
in
{
nixosConfigurations = {
desktop = mkSystem "desktop";
laptop = mkSystem "laptop";
# hostname 仍是 nixos:让不带 attr 的 `nixos-rebuild --flake .#` 也能命中
nixos = mkSystem "laptop";
};
# 无 flake 时也可:把本仓库拷到 /etc/nixos 后 nixos-rebuild switch
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
};
}