Move programs.nix-ld out of the core aspect into modules/dev/nix-ld.nix and extend the library set (on top of the module defaults) with the runtime libraries that prebuilt binaries commonly link or dlopen: C++ runtime, compression and crypto, GL/Vulkan/Wayland, audio, fonts, GTK and Electron-style helpers, and the X11 client libraries. Enable programs.appimage with binfmt so .AppImage files run directly through appimage-run. Import the aspect from the desktop host and document it in the README. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
52 lines
1.5 KiB
Nix
52 lines
1.5 KiB
Nix
# Nix daemon settings, binary caches, garbage collection and flake registry.
|
|
{ config, inputs, ... }:
|
|
let
|
|
inherit (config.meta) owner;
|
|
in
|
|
{
|
|
flake.modules.nixos.core = {
|
|
nix = {
|
|
settings = {
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
auto-optimise-store = true;
|
|
# root is already trusted by default; this adds the admin group.
|
|
trusted-users = [ "@wheel" ];
|
|
warn-dirty = false;
|
|
# Same caches as flake.nixConfig, so the system keeps using them after
|
|
# install without the "untrusted flake settings" prompt.
|
|
extra-substituters = [
|
|
"https://nix-community.cachix.org"
|
|
"https://noctalia.cachix.org"
|
|
];
|
|
extra-trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
|
|
];
|
|
};
|
|
|
|
gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 14d";
|
|
};
|
|
|
|
# `nix shell nixpkgs#foo` and <nixpkgs> use the exact nixpkgs of this flake
|
|
# instead of fetching a different revision.
|
|
channel.enable = false;
|
|
registry.nixpkgs.flake = inputs.nixpkgs;
|
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
};
|
|
|
|
programs = {
|
|
# Nicer `nixos-rebuild` front-end that knows where the flake lives.
|
|
nh = {
|
|
enable = true;
|
|
flake = "/home/${owner.name}/nixos-config";
|
|
};
|
|
};
|
|
};
|
|
}
|