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

Please re-add module.nix #8

Closed
thoughtpolice opened this issue Dec 9, 2019 · 3 comments
Closed

Please re-add module.nix #8

thoughtpolice opened this issue Dec 9, 2019 · 3 comments

Comments

@thoughtpolice
Copy link

I would really like to use DwarfFS so that I can turn off global debug packages for my system -- not having symbols at debug time is pretty much the only reason to enable it!

However, 2f984ab inlined the module.nix file into the new flake description. I understand the desire to use self-contained tools like dwarffs for experimenting with Flakes, but I'm not running the Flake branch, and dwarffs is useful without it!

I'd like to propose re-adding the old module.nix file so DwarfFS can be used by non-flake users without writing their own. I do not know if code reuse is possible, but I don't think it's worth it for such a conceptually simple expression.

Alternatively, packaging dwarffs upstream inside Nixpkgs would also be great IMO, but I understand if you don't want to do that since it'll directly conflict with the flake experiment...

@emilazy
Copy link

emilazy commented Dec 14, 2019

I'd also like to see this return; alternatively, I'd be happy to use flake.nix if it's possible to merge the nixosModule in from my (non-flakes-supporting) config, but I'm not sure how to wire it up.

@emilazy
Copy link

emilazy commented Jan 10, 2020

If anyone wants to use dwarffs on NixOS without flakes, the following seems to work:

{ config, pkgs, lib, ... }:

let
  # <dwarffs> / <dwarffs/flake.nix> also an option if you add it to NIX_PATH
  dwarffs =
    { __toString = _: ./path/to/dwarffs; } //
    (import ./path/to/dwarffs/flake.nix).outputs {
      self = dwarffs;
      nixpkgs = pkgs;
    };
in

{
  imports = [
    # ...
    dwarffs.nixosModules.dwarffs
  ];

  # ...
}

@layus
Copy link

layus commented Dec 26, 2020

Either that, or the Readme should be updated accordingly. At the moment it literally reads

To enable dwarffs, add the following to your configuration.nix:

    imports = [ (builtins.fetchGit https://github.com/edolstra/dwarffs + "/module.nix") ];

which obviously does not work.

PS: necrobumping every year :-). How many years will this stand ?

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

3 participants