Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing via nix flake #40

Open
am-on opened this issue Jan 3, 2025 · 0 comments
Open

Issues installing via nix flake #40

am-on opened this issue Jan 3, 2025 · 0 comments

Comments

@am-on
Copy link
Contributor

am-on commented Jan 3, 2025

With the following flake.nix

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
  inputs.nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.paretosecurity.url = "github:paretosecurity/pareto-linux";

  outputs =
    { self
    , nixpkgs
    , nixpkgs-unstable
    , paretosecurity
    ,
    }:

    let
      system = "x86_64-linux";

      overlay-unstable = final: prev: {
        unstable = import nixpkgs-unstable {
          inherit system;
          config.allowUnfree = true;
        };
      };

      overlayModules = [
        (
          { config, pkgs, ... }:
          {
            nixpkgs.overlays = [
              overlay-unstable
            ];
          }
        )
      ];

      pareto = [
        paretosecurity.nixosModules.default
        {
          environment.systemPackages = [ paretosecurity.packages.${system}.default ];
        }
      ];

    in
    {
      # change `yourhostname` to your actual hostname
      nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
        # change to your system:
        system = "x86_64-linux";
        modules = overlayModules ++ pareto ++ [ ./configuration.nix ];
      };
    };
}

I get this error:

       error: undefined variable 'mkOption'
       at /nix/store/fklqw8fr9fdkdj4shfxaiji78i3w99c9-source/modules/paretosecurity.nix:7:46:
            6| }: {
            7|   options.paretosecurity.paretosecurityBin = mkOption {
             |                                              ^
            8|     type = types.str;
am-on added a commit that referenced this issue Jan 31, 2025
Fix `error: undefined variable 'mkOption'` by using `lib.mkOption`.

fixes: #40
am-on added a commit that referenced this issue Jan 31, 2025
* fix: undefined mkOption

Fix `error: undefined variable 'mkOption'` by using `lib.mkOption`.

* fix: undefined literalExpression

Ref: #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant