Skip to content

Schemas doesn't work at all? #32

Closed

Description

@Lillecarl
~/C/nixos [🎋 master][!+][🐍 v3.12.7][🗀 loaded/allowed][🐚fish][as🧙][⏱ 51s]
[17:13:50]❯  nix flake show github:DeterminateSystems/flake-schemas
github:DeterminateSystems/flake-schemas/0a5c42297d870156d9c57d8f99e476b738dcd982?narHash=sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw%3D
├───lib: unknown
└───schemas: unknown
~/C/nixos [🎋 master][!+][🐍 v3.12.7][🗀 loaded/allowed][🐚fish][as🧙]
[17:17:18]❯ nix --version
nix (Nix) 2.24.10

When running nix flake show on this repo it doesn't show the schema for "output type" schemas, also my homeConfigurations outputs on my personal repo shows unknown with and without schemas.homeConfigurations output added. Am I holding it wrong? As you can see from nix config I've installed Nix with the DetSys installer.

nix config
abort-on-warn = false
accept-flake-config = false
access-tokens = 
allow-dirty = true
allow-import-from-derivation = true
allow-new-privileges = false
allow-symlinked-store = false
allow-unsafe-native-code-during-evaluation = false
allowed-impure-host-deps = 
allowed-uris = 
allowed-users = *
always-allow-substitutes = true
auto-optimise-store = true
bash-prompt = 
bash-prompt-prefix = (nix:$name)\040
bash-prompt-suffix = 
build-dir = 
build-hook = /nix/store/30gnc15nig1awa11vii9yz3z8518rnr3-nix-2.24.10/bin/nix __build-remote
build-poll-interval = 5
build-users-group = nixbld
builders = @/etc/nix/machines
builders-use-substitutes = false
commit-lock-file-summary = 
compress-build-log = true
connect-timeout = 0
cores = 8
debugger-on-trace = false
debugger-on-warn = false
diff-hook = 
download-attempts = 5
download-buffer-size = 67108864
download-speed = 0
eval-cache = true
eval-system = 
experimental-features = fetch-tree flakes nix-command
extra-platforms = 
fallback = false
filter-syscalls = true
flake-registry = https://channels.nixos.org/flake-registry.json
fsync-metadata = true
gc-reserved-space = 8388608
hashed-mirrors = 
http-connections = 25
http2 = true
id-count = 8388608
ignore-try = false
ignored-acls = security.csm security.selinux system.nfs4_acl
impersonate-linux-26 = false
keep-build-log = true
keep-derivations = true
keep-env-derivations = false
keep-failed = false
keep-going = false
keep-outputs = false
log-lines = 25
max-build-log-size = 0
max-call-depth = 10000
max-free = 18446744073709551615
max-jobs = 8
max-silent-time = 0
max-substitution-jobs = 16
min-free = 0
min-free-check-interval = 5
nar-buffer-size = 33554432
narinfo-cache-negative-ttl = 3600
narinfo-cache-positive-ttl = 2592000
netrc-file = /etc/nix/netrc
nix-path = nixpkgs=flake:nixpkgs
nix-shell-always-looks-for-shell-nix = true
nix-shell-shebang-arguments-relative-to-script = true
plugin-files = 
post-build-hook = 
pre-build-hook = 
preallocate-contents = false
print-missing = true
pure-eval = true
require-drop-supplementary-groups = false
require-sigs = true
restrict-eval = false
run-diff-hook = false
sandbox = true
sandbox-build-dir = /build
sandbox-dev-shm-size = 50%
sandbox-fallback = true
sandbox-paths = /bin/sh=/nix/store/s3z71508m79mk3v7hxaw56y7hjmhsqqp-busybox-static-aarch64-unknown-linux-musl-1.36.1/bin/busybox
secret-key-files = 
show-trace = false
ssl-cert-file = /etc/ssl/certs/ca-certificates.crt
stalled-download-timeout = 300
start-id = 872415232
store = auto
substitute = true
substituters = https://cache.nixos.org/
sync-before-registering = false
system = aarch64-linux
system-features = benchmark big-parallel nixos-test uid-range
tarball-ttl = 3600
timeout = 0
trace-function-calls = false
trace-verbose = false
trust-tarballs-from-git-forges = true
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= cache.flakehub.com-4:Asi8qIv291s0aYLyH6IOnr5Kf6+OF14WVjkE6t3xMio= cache.flakehub.com-5:zB96CRlL7tiPtzA9/WKyPkp3A2vqxqgdgyTVNGShPDU= cache.flakehub.com-6:W4EGFwAGgBj3he7c5fNh9NkOXw0PUVaxygCVKeuvaqU= cache.flakehub.com-7:mvxJ2DZVHn/kRxlIaxYNMuDG1OvMckZu32um1TadOR8= cache.flakehub.com-8:moO+OVS0mnTjBTcOUh2kYLQEd59ExzyoW1QgQ8XAARQ= cache.flakehub.com-9:wChaSeTI6TeCuV/Sg2513ZIM9i0qJaYsF+lZCXg0J6o= cache.flakehub.com-10:2GqeNlIp6AKp4EF2MVbE1kBOp9iBSyo0UPR9KoR0o1Y=
trusted-substituters = https://cache.flakehub.com
trusted-users = root
upgrade-nix-store-path-url = https://install.determinate.systems/nix-upgrade/stable/universal
use-case-hack = false
use-cgroups = false
use-registries = true
use-sqlite-wal = true
use-xdg-base-directories = false
user-agent-suffix = 
warn-dirty = false
warn-large-path-threshold = 18446744073709551615

Activity

  1. lucperkins commented on Nov 27, 2024

    @lucperkins
    Member

    Flake schemas have not yet been merged into Nix: NixOS/nix#8892. For now, in order to experiment with flake schemas, you can build Nix from the relevant branch or run it directly like this:

    nix run github:DeterminateSystems/nix-src/flake-schemas -- \
      flake show github:DeterminateSystems/flake-schemas

    The output:

    github:DeterminateSystems/flake-schemas/0a5c42297d870156d9c57d8f99e476b738dcd982?narHash=sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw%3D
    ├───lib
    │   └───(unknown flake output)
    └───schemas
        ├───apps: flake schema
        ├───checks: flake schema
        ├───darwinConfigurations: flake schema
        ├───darwinModules: flake schema
        ├───devShells: flake schema
        ├───dockerImages: flake schema
        ├───formatter: flake schema
        ├───homeConfigurations: flake schema
        ├───homeModules: flake schema
        ├───hydraJobs: flake schema
        ├───legacyPackages: flake schema
        ├───nixosConfigurations: flake schema
        ├───nixosModules: flake schema
        ├───overlays: flake schema
        ├───packages: flake schema
        ├───schemas: flake schema
        └───templates: flake schema
    

    As JSON:

    {
      "lib": {
        "unknown": true
      },
      "schemas": {
        "doc": "The `schemas` flake output is used to define and document flake outputs.\nFor the expected format, consult the Nix manual.\n",
        "output": {
          "children": {
            "apps": {
              "leaf": true,
              "shortDescription": "A schema checker for the `apps` flake output",
              "what": "flake schema"
            },
            "checks": {
              "leaf": true,
              "shortDescription": "A schema checker for the `checks` flake output",
              "what": "flake schema"
            },
            "darwinConfigurations": {
              "leaf": true,
              "shortDescription": "A schema checker for the `darwinConfigurations` flake output",
              "what": "flake schema"
            },
            "darwinModules": {
              "leaf": true,
              "shortDescription": "A schema checker for the `darwinModules` flake output",
              "what": "flake schema"
            },
            "devShells": {
              "leaf": true,
              "shortDescription": "A schema checker for the `devShells` flake output",
              "what": "flake schema"
            },
            "dockerImages": {
              "leaf": true,
              "shortDescription": "A schema checker for the `dockerImages` flake output",
              "what": "flake schema"
            },
            "formatter": {
              "leaf": true,
              "shortDescription": "A schema checker for the `formatter` flake output",
              "what": "flake schema"
            },
            "homeConfigurations": {
              "leaf": true,
              "shortDescription": "A schema checker for the `homeConfigurations` flake output",
              "what": "flake schema"
            },
            "homeModules": {
              "leaf": true,
              "shortDescription": "A schema checker for the `homeModules` flake output",
              "what": "flake schema"
            },
            "hydraJobs": {
              "leaf": true,
              "shortDescription": "A schema checker for the `hydraJobs` flake output",
              "what": "flake schema"
            },
            "legacyPackages": {
              "leaf": true,
              "shortDescription": "A schema checker for the `legacyPackages` flake output",
              "what": "flake schema"
            },
            "nixosConfigurations": {
              "leaf": true,
              "shortDescription": "A schema checker for the `nixosConfigurations` flake output",
              "what": "flake schema"
            },
            "nixosModules": {
              "leaf": true,
              "shortDescription": "A schema checker for the `nixosModules` flake output",
              "what": "flake schema"
            },
            "overlays": {
              "leaf": true,
              "shortDescription": "A schema checker for the `overlays` flake output",
              "what": "flake schema"
            },
            "packages": {
              "leaf": true,
              "shortDescription": "A schema checker for the `packages` flake output",
              "what": "flake schema"
            },
            "schemas": {
              "leaf": true,
              "shortDescription": "A schema checker for the `schemas` flake output",
              "what": "flake schema"
            },
            "templates": {
              "leaf": true,
              "shortDescription": "A schema checker for the `templates` flake output",
              "what": "flake schema"
            }
          }
        }
      }
    }

    I'll update the README to make the status of schemas more clear.

  2. lucperkins commented on Nov 27, 2024

    @lucperkins
    Member

    @Lillecarl I'm going to close this issue, as we've now made this more clear in the README. But we're glad that you're eager to experiment with this. Stay tuned for updates on this hopefully soon.

  3. Lillecarl commented on Nov 28, 2024

    @Lillecarl
    Author

    Hey @lucperkins, thanks for the response and clarification. I would much rather try this feature out through DetNix than through a branch that hasn't been updated since July 😉

    UX wise it's a pretty big improvement over going into the REPL and probing whatever outputs a flake happens to expose 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions