MatthewCroughan / nixinate

Another NixOS Deployment Tool - Nixinate your systems 🕶️
MIT License
240 stars 32 forks source link

error: attribute 'currentSystem' missing #42

Closed j0lol closed 1 year ago

j0lol commented 1 year ago

when i run nix flake show in my flake, i get this error:

git+file:///home/jo/Projects/configuration2
├───apps
│   └───nixinate
error: attribute 'currentSystem' missing

       at /nix/store/jzbrxi44g3z3320b6k60nvp3kfw01ja1-source/pkgs/top-level/impure.nix:17:43:

           16|   # (build, in GNU Autotools parlance) platform.
           17|   localSystem ? { system = args.system or builtins.currentSystem; }
             |                                           ^
           18|
(use '--show-trace' to show detailed location information)

my flake is at https://codeberg.org/j0/configuration2

MatthewCroughan commented 1 year ago

@j0lol this error seems to have nothing to do with Nixinate, since if you remove Nixinate entirely from the flake, the error still persists. It seems to be coming from your nixos-pc nixosConfiguration:

nix flake check
warning: Git tree '/home/matthew/tmp/configuration2' is dirty
warning: updating lock file '/home/matthew/tmp/configuration2/flake.lock':
• Removed input 'nixinate'
• Removed input 'nixinate/nixpkgs'
warning: Git tree '/home/matthew/tmp/configuration2' is dirty
warning: unknown flake output 'inputs'
error:
       … while checking flake output 'nixosConfigurations'

         at /nix/store/6r6lgj06mlaq5xap9l50cbcibixjcxqj-source/flake.nix:48:5:

           47|
           48|     nixosConfigurations.nixos-pc = let
             |     ^
           49|       pkgs = import nixpkgs { overlays = [ self.overlays.default ];};

       … while checking the NixOS configuration 'nixosConfigurations.nixos-pc'

         at /nix/store/6r6lgj06mlaq5xap9l50cbcibixjcxqj-source/flake.nix:48:5:

           47|
           48|     nixosConfigurations.nixos-pc = let
             |     ^
           49|       pkgs = import nixpkgs { overlays = [ self.overlays.default ];};

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'currentSystem' missing

       at /nix/store/jzbrxi44g3z3320b6k60nvp3kfw01ja1-source/pkgs/top-level/impure.nix:17:43:

           16|   # (build, in GNU Autotools parlance) platform.
           17|   localSystem ? { system = args.system or builtins.currentSystem; }
             |                                           ^
           18|
j0lol commented 1 year ago

oh! sorry! it looked like an issue with nixinate because it only seemed to happen when i tried to use nixinate

j0lol commented 1 year ago

my mistake was not using nix flake check... sorry for making an irrelevant issue!