Skip to content

Question: how to run appsย #323

@beckend

Description

@beckend
admin๐Ÿ’ปlaptop-main ๐Ÿ—‚๏ธ /etc/nixos on main โœ“
> nix flake show
warning: Git tree '/etc/nixos' is dirty
git+file:///etc/nixos
โ”œโ”€โ”€โ”€apps
โ”‚   โ”œโ”€โ”€โ”€aarch64-darwin
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€aarch64-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€armv6l-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€armv7l-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€i686-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€powerpc64le-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€riscv64-linux
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€x86_64-darwin
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ”œโ”€โ”€โ”€x86_64-freebsd
โ”‚   โ”‚   โ””โ”€โ”€โ”€"vms.test.run": app: test
โ”‚   โ””โ”€โ”€โ”€x86_64-linux
โ”‚       โ””โ”€โ”€โ”€"vms.test.run": app: test

flake_part_vm_test.nix

{ }:

{
  perSystem =
    { pkgs, ... }:
    {
      apps = {
        "vms.test.run" = {
          program = "${pkgs.coreutils}/bin/ls";
          type = "app";

          meta = {
            description = "test";
          };
        };
      };
    };
> nix run .#vms.test.run
warning: Git tree '/etc/nixos' is dirty
error: flake 'git+file:///etc/nixos' does not provide attribute 'apps.x86_64-linux.vms.test.run', 'packages.x86_64-linux.vms.test.run', 'legacyPackages.x86_64-linux.vms.test.run' or 'vms.test.run'
       Did you mean one of ams, dms, lms, nms or pms?

> nix run .#apps.x86_64-linux.vms.test.run
warning: Git tree '/etc/nixos' is dirty
error: flake 'git+file:///etc/nixos' does not provide attribute 'apps.x86_64-linux.apps.x86_64-linux.vms.test.run', 'packages.x86_64-linux.apps.x86_64-linux.vms.test.run', 'legacyPackages.x86_64-linux.apps.x86_64-linux.vms.test.run' or 'apps.x86_64-linux.vms.test.run'
       Did you mean one of a2ps, alps, apbs, aapt or acpi?

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

      โšก