nix-community / kde2nix

Provisional, experimental Plasma 6 (and friends) pre-release packaging [maintainer=@K900]
MIT License
65 stars 6 forks source link

The option `services.xserver.desktopManager.plasma6' does not exist. #25

Closed sedrubal closed 10 months ago

sedrubal commented 10 months ago

This might be a stupid question, but I'm new to nix. The README says:

Add this to your flake inputs and include the NixOS module in your config, then services.xserver.desktopManager.plasma6.enable = true.

I added this to my flake.nix:

{
  inputs = {
    # ...
    kde2nix.url = "github:nix-community/kde2nix/main";
  };
  outputs = inputs@{ self, kde2nix, ... }: {
  # ...
}

And this to my configuration.nix:

  # ...
  services.xserver.desktopManager = {
    plasma5 = {
      enable = true;
    };
    plasma6 = {
      enable = true;
    };
  };
  # ...

But while rebuilding, I get this error:

error:
       … while calling the 'seq' builtin

         at /nix/store/rzphaas2lw2d5376k9f619580hcn4niq-source/lib/modules.nix:320:18:

          319|         options = checked options;
          320|         config = checked (removeAttrs config [ "_module" ]);
             |                  ^
          321|         _module = checked (config._module);

       … while calling the 'throw' builtin

         at /nix/store/rzphaas2lw2d5376k9f619580hcn4niq-source/lib/modules.nix:296:18:

          295|                     ''
          296|             else throw baseMsg
             |                  ^
          297|         else null;

       error: The option `services.xserver.desktopManager.plasma6' does not exist. Definition values:
       - In `/nix/store/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-source/configuration.nix':
           {
             enable = true;
           }

Am I missing something? Thank you!

pongo1231 commented 10 months ago

You also need to import the module

imports = [
  inputs.kde2nix.nixosModules.default
];
sedrubal commented 10 months ago

Thanks for your quick answer. However, sorry for asking again, but now I get error: undefined variable 'inputs'. How do I get the variable inputs?

pongo1231 commented 10 months ago

Pass the inputs to specialArgs in your flake.nix

specialArgs = { inherit inputs; };

and add inputs to the list of arguments at the top of your configuration.nix.

Alternatively you can also just import the module directly in the flake.nix.

sedrubal commented 10 months ago

Thank you, now it works.