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

expose flk devshell module #55

Closed
wants to merge 2 commits into from

Conversation

blaggacao
Copy link
Contributor

a more useful attempt than #39 for #38

Copy link
Contributor Author

@blaggacao blaggacao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder...

shells/flk/default.nix Show resolved Hide resolved
@nrdxp
Copy link
Collaborator

nrdxp commented Dec 29, 2020

What command can I run to access the shells. I've tried nix develop ".#devshellModules.flk" with no success.

@blaggacao
Copy link
Contributor Author

blaggacao commented Dec 29, 2020

image

.#devshellModules.flk would be for somebody else to compose:

{
  inputs.flake-utils.url = "github:numtide/flake-utils";
  inputs.devshell.url = "github:numtide/devshell";
  inputs.nixflk.uri = "github:nrdxp/nixflk";

  outputs = { self, flake-utils, devshell, nixflk, nixpkgs }:
    flake-utils.lib.simpleFlake {
      inherit nixpkgs;
      name = "my-project";
      preOverlays = [ (import devshell.overlay) ];
      shell = { pkgs }:
        pkgs.mkDevShell {
          imports  = [ (import nixflk.devshellModules.flk) ];
        };
    };
}

@blaggacao
Copy link
Contributor Author

You question promoted this thought: numtide/devshell#52 (comment)

@nrdxp nrdxp added enhancement New feature or request help wanted Extra attention is needed labels Dec 30, 2020
@blaggacao
Copy link
Contributor Author

blaggacao commented Jan 10, 2021

This should be (theoretically) good to go, I've rebase.

Setting a precedent for sharing devshells according to discussion over at numtide/devshell#52 (comment)

$ nix flake show
git+file:///home/blaggacao/ghq/github.com/nrdxp/nixflk
...
├───devshellModules: unknown
...

And nix develop works as expected

$ nix develop
🔨 Welcome to flk

[general commands]

  hooks       - install git hooks
  menu        - prints this menu

[linters]

  nixpkgs-fmt - Nix code formatter for nixpkgs

[main]

  flk         - Build, deploy, and install nixflk
  nix         - Powerful package manager that makes package management reliable and reproducible

[servers]

  grip        - Preview GitHub Markdown files like Readme locally before committing them

[vcs]

  git         - Distributed version control system
[flk]$ flk
Usage: flk [ iso | install {host} | {host} [switch|boot|test] ]

@blaggacao
Copy link
Contributor Author

@zimbatm would you mind giving your feedback? (mainly to make sure this attempt on devshell sharing is +- inline with your ideas or even plans, if any)

@zimbatm
Copy link

zimbatm commented Jan 21, 2021

The idea of shareable modules was for projects that want to provide extensions to the devshell. It seems that nixflk is a project template, so I would really keep things as simple as possible. If there are re-usable bits, break them out into a different project and then import them here.

I haven't looked at nixflk closely so I might be wrong.

@blaggacao
Copy link
Contributor Author

blaggacao commented Feb 9, 2021

Now, with the new devshell module system in place, the impetus of this PR merits revisiting from a different angle some time in the near future on behalf of nixflk.

So I'm closing this for now and might think over it again in the coming days (hopefully, I'll find some time).

* The impetus was: How can we nudge users of nixflk into sharing their (personal) devshell modules, so that other users can "follow" their favorite expert on a devshell realm (say: rust) — social stock trading style.

@blaggacao blaggacao closed this Feb 9, 2021
@blaggacao blaggacao deleted the da-devshell-module branch March 16, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants