Fil-C on Nix

Filnix wiki

mbrock/filnix

Options

The options filnix's exported NixOS and finix modules declare and the ones they set, as evaluating the modules gives them: where each is declared, its type, default and description, and the files that define it in the machine evaluated. For an option a module sets: the definition as written, its value in that machine, and the port that builds the package. Which modules read an option comes from their source: a selection such as cfg.nix.enable followed back to the module's config.

NixOS: filc-system

Evaluated in dterm-nix/options.nix with lib/filc-system.nix.

Declared by lib/filc-system.nix

filc.enableboolean
defaultfalse
exampletrue
declaredlib/filc-system.nix:82
defineddterm-nix/options.nix
read by

Whether to enable the Fil-C system: pkgs is filnix's Fil-C package set.

filc.nativefunction that evaluates to a(n) attribute set of raw value
defaultnative: { }
examplenative: inherit native tailscale ripgrep;
declaredlib/filc-system.nix:95
definedonly by its default
read by

Packages to take from the native package set instead of building them with Fil-C, as a function of that set. Use it for Rust and Go programs you want anyway, and for C programs that do not work yet. Each one runs as an ordinary native process with native libraries. A name the native set does not have fails evaluation. The packages in filnix's lib/native-exceptions.nix are always native.

filc.nativeNixboolean
defaulttrue
declaredlib/filc-system.nix:122
definedonly by its default
read by

Whether Nix itself (the daemon and CLI) is the native build. The Fil-C build works but cannot sandbox builds, having no namespaces or seccomp; with this off, the build sandbox is turned off too.

filc.nativePackagesnull or raw value
defaultimportfilnix.inputs.nixpkgs inherit config.filc system;
exampleimportnixpkgs system = "x86_64-linux";
declaredlib/filc-system.nix:110
definedonly by its default
read by

The native package set that the exceptions come from. By default, filnix's own Nixpkgs, imported natively. Your usual Nixpkgs works too and gets its binary cache hits.

filc.packagesraw valueread-only
declaredlib/filc-system.nix:132
definedlib/filc-system.nix
read by

The resulting package set, which is also pkgs.

filc.systemone of "aarch64-linux", "x86_64-linux"
default"x86_64-linux"
declaredlib/filc-system.nix:86
definedonly by its default
read by

The system to build for.

Set by lib/filc-system.nix

assertionslist of unspecified value
set to
assertions=
map
λname
154assertion=
nativePkgs ? ${name}
155message=
"filc: the native package set has no ${name}, a built-in native exception (lib/native-exceptions.nix). Was it renamed in Nixpkgs?"
lib.attrNamesexceptions
++
161assertion=
lib.allv: builtins.seqv true lib.attrValuesuserNative
162message=
"filc.native: every value must evaluate."
default[ ]
exampleassertion = false; message = "you can't enable this for that reason";
declarednixpkgs/nixos/modules/misc/assertions.nix:6
definedonly by its default
read byno module read found

This option allows modules to express conditions that must hold for the evaluation of the system configuration to succeed, along with associated error messages for the user.

environment.systemPackageslist of package
set to
environment.systemPackages=
filc-ps
default[ ]
examplepkgs.firefox pkgs.thunderbird
declarednixpkgs/nixos/modules/config/system-path.nix:74
definedonly by its default
read by

The set of packages that appear in /run/current-system/sw. These packages are automatically available to all users, and are automatically updated every time you rebuild the system configuration. (The latter is the main difference with installing them in the default profile, /nix/var/nix/profiles/default.

nixpkgs.pkgsAn evaluation of Nixpkgs; the top level attribute set of packages
set to
nixpkgs.pkgs=
cfg.packages
defaultimport"${nixos}/.." inherit config.nixpkgs config overlays localSystem crossSystem;
exampleimport { }
declarednixpkgs/nixos/modules/misc/nixpkgs.nix:122
definedlib/filc-system.nix
read by

If set, the pkgs argument to all NixOS modules is the value of this option, extended with nixpkgs.overlays, if that is also set. Either nixpkgs.crossSystem or nixpkgs.localSystem will be used in an assertion to check that the NixOS and Nixpkgs architectures match. Any other options in nixpkgs.*, notably config, will be ignored.

If unset, the pkgs argument to all NixOS modules is determined as shown in the default value for this option.

The default value imports the Nixpkgs source files relative to the location of this NixOS module, because NixOS and Nixpkgs are distributed together for consistency, so the nixos in the default value is in fact a relative path. The config, overlays, localSystem, and crossSystem come from this option's siblings.

This option can be used by applications like NixOps to increase the performance of evaluation, or to create packages that depend on a container that should be built with the exact same evaluation of Nixpkgs, for example. Applications like this should set their default value using lib.mkDefault, so user-provided configuration can override it without using lib.

Note that using a distinct version of Nixpkgs with NixOS may be an unexpected source of problems. Use this option with care.

NixOS: nixosModules.default

Evaluated in dterm-nix/options.nix with nixos/default.nix.

Set by nixos/default.nix

nix.settingsopen submodule of attribute set of (Nix config atom (null, bool, int, float, str, path or package) or list of (Nix config atom (null, bool, int, float, str, path or package)))
default{ }
exampleuse-sandbox = true; show-trace = true; sandbox-paths = "/bin/sh=${pkgs.busybox-sandbox-shell.out}/bin/busybox";
declarednixpkgs/nixos/modules/config/nix.nix:164
definednixos/default.nix, nixpkgs/nixos/modules/services/system/nix-daemon.nix, nixpkgs/nixos/modules/config/nix.nix, nixpkgs/nixos/modules/config/nix-remote-build.nix
read by

Configuration for Nix, see https://nixos.org/manual/nix/stable/command-ref/conf-file.html or nix.conf(5) for available options. The value declared here will be translated directly to the key-value pairs Nix expects.

You can use nix-instantiate --eval --strict '<nixpkgs/nixos>' -A config.nix.settings to view the current value. By default it is empty.

Nix configurations defined under nix.* will be translated and applied to this option. In addition, configuration specified in nix.extraOptions will be appended verbatim to the resulting config file.

services.dbus.implementationone of "dbus", "broker"
set to
services.dbus.implementation=
lib.mkDefault"dbus"
default"broker"
declarednixpkgs/nixos/modules/services/system/dbus.nix:66
definednixos/default.nix
read by

The implementation to use for the message bus defined by the D-Bus specification. Can be either the classic dbus daemon or dbus-broker, which aims to provide high performance and reliability, while keeping compatibility to the D-Bus reference implementation.

services.nscd.enableboolean
set to
services.nscd.enable=
lib.mkDefaultfalse
defaulttrue
declarednixpkgs/nixos/modules/services/system/nscd.nix:22
definednixos/default.nix
read by

Whether to enable the Name Service Cache Daemon. Disabling this is strongly discouraged, as this effectively disables NSS Lookups from all non-glibc NSS modules, including the ones provided by systemd.

system.nssModuleslist of absolute path
set to
system.nssModules=
lib.mkIf¬config.services.nscd.enable lib.mkForce[ ]
default[ ]
declarednixpkgs/nixos/modules/config/nsswitch.nix:13
definednixos/default.nix
read by

Search path for NSS (Name Service Switch) modules. This allows several DNS resolution methods to be specified via /etc/nsswitch.conf.

systemd.packageslist of package
set to
systemd.packages=
pkgs.writeTextDir"etc/systemd/system/service.d/zz-filc-no-private-users.conf"
[Service]
PrivateUsers=no
pkgs.writeTextDir"etc/systemd/system/service.d/zz-filc-no-ioprio.conf"
[Service]
IOSchedulingClass=
IOSchedulingPriority=
pkgs.writeTextDir"etc/systemd/system/mount.d/zz-filc-classic-mount.conf"
[Mount]
Environment=LIBMOUNT_FORCE_MOUNT2=always
default[ ]
examplepkgs.systemd-cryptsetup-generator
declarednixpkgs/nixos/modules/system/boot/systemd.nix:298
definedonly by its default
read by

Packages providing systemd units and hooks.

finix: finixModules.default

Evaluated in dterm-nix/options.nix with finix/default.nix.