Files
nix-config/outputs/x86_64-linux/src/idols-ai.nix
T
ryan4yin | 二花 ccffddc864 feat(wechat): native nixpkgs package with app-scoped data (#492)
Switch to the native deb package from nixpkgs-patched (#560225), remove the AppImage/FHS bwrap layer, and enable native Wayland while keeping the X11 fallback.

Keep only WeChat state under one app-scoped HOME and bind the host Documents and Downloads directories like the other desktop apps. User-selected files also go through the XDG FileChooser portal. Remove the launcher, activation script, and compatibility symlinks.

Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-01 00:09:27 +08:00

64 lines
1.7 KiB
Nix

{
# NOTE: the args not used in this file CAN NOT be removed!
# because haumea pass argument lazily,
# and these arguments are used in the functions like `mylib.nixosSystem`, `mylib.colmenaSystem`, etc.
inputs,
lib,
myvars,
mylib,
system,
genSpecialArgs,
niri,
...
}@args:
let
# 星野 アイ, Hoshino Ai
name = "ai";
base-modules = {
nixos-modules =
(map mylib.relativeToRoot [
# common
"secrets/nixos.nix"
"modules/nixos/desktop.nix"
# host specific
"hosts/idols-${name}"
# nixos hardening
"hardening/nixpaks"
])
++ [
{
modules.desktop.fonts.enable = true;
modules.desktop.wayland.enable = true;
modules.secrets.desktop.enable = true;
modules.secrets.preservation.enable = true;
modules.desktop.gaming.enable = true;
modules.desktop.canokey.enable = true;
# Native mihomo core + local web dashboard instead of the Clash Verge
# GUI; its config is ~/.config/mihomo/config.yaml (out of the store).
modules.networking.mihomo.enable = true;
}
];
home-modules = map mylib.relativeToRoot [
"home/hosts/linux/idols-${name}.nix"
];
};
modules-niri = {
nixos-modules = [
{ programs.niri.enable = true; }
]
++ base-modules.nixos-modules;
home-modules = base-modules.home-modules;
};
in
{
nixosConfigurations = {
"${name}-niri" = mylib.nixosSystem (modules-niri // args);
};
# generate iso image for hosts with desktop environment
packages = {
"${name}-niri" = inputs.self.nixosConfigurations."${name}-niri".config.system.build.images.iso;
};
}