Skip to content

Conversation

@deemp
Copy link
Contributor

@deemp deemp commented Jan 5, 2024

Previously: part of #288

  • Update docs
    • Refactor files structure
    • Add TOC
  • Update flake
    • Update nixpkgs
    • Use flake-utils
    • Refactor to use flake-utils

This was referenced Jan 5, 2024
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

almost ready

language = "en"
multilingual = false
src = "."
src = "src"
Copy link
Member

Choose a reason for hiding this comment

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

What is the motivation for moving this one level down? It's one more level to traverse when navigating the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This structure is described in the mdbook docs

flake.nix Outdated
path = ./templates/flake-parts;
description = "nix flake new my-project -t github:numtide/devshell#flake-parts";
# nix flake update --recreate-lock-file
inputs.nixpkgs.url = "github:NixOS/nixpkgs/efc960b6d6a6498c23868f4ba59fcb8bb51c9861";
Copy link
Member

Choose a reason for hiding this comment

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

Can you point to a channel instead, to make it easier to bump nixpkgs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in bd708b4

@zimbatm zimbatm merged commit f54745f into numtide:main Jan 7, 2024
@zimbatm
Copy link
Member

zimbatm commented Jan 7, 2024

thanks!

@sigprof
Copy link

sigprof commented Jan 11, 2024

Before this change it was possible to use the devshell flake without overlays (#162, #165):

    devshell.inputs.nixpkgs.follows = "nixpkgs";
          devShells.default = inputs.devshell.legacyPackages.${system}.mkShell {
            # ... configuration ...
          };

But this PR removed legacyPackages. What would be the proper way to use the devshell flake without overlays now?

The following works, but looks like a hack due to the non-flake import (and the inputs and nixpkgs arguments for default.nix don't seem to be documented):

          devshell = import inputs.devshell {
            inherit system;
            inputs = null;
            nixpkgs = inputs.nixpkgs.legacyPackages.${system};
          };
          devShells.default = devshell.mkShell {
            # ... configuration ...
          };

Is migrating to flake-parts the only supported way forward?

@deemp
Copy link
Contributor Author

deemp commented Jan 11, 2024

Thank you! It's a regression. The only way is to restore legacyPackages. I'll make a PR

deemp added a commit to deemp/devshell that referenced this pull request Jan 11, 2024
zimbatm pushed a commit that referenced this pull request Jan 11, 2024
root = ./.;
fileset = fs.unions [
(fs.fileFilter (file: file.hasExt "md") ./src)
(fs.fileFilter (file: true) ./theme)

Choose a reason for hiding this comment

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

Oh just randomly seeing this: There's no need to use fileFilter when you want to include every file of a directory, ./theme by itself is also coerced to a file set to contain all its files :)

Suggested change
(fs.fileFilter (file: true) ./theme)
./theme

zimbatm added a commit that referenced this pull request Mar 22, 2024
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

Successfully merging this pull request may close these issues.

4 participants