Skip to content

Commit 14f30f5

Browse files
committed
Improve advanced example
- shows how to override which systems are exposed from the resulting flake. - use a custom nixpkgs ref
1 parent c196fac commit 14f30f5

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

lib/devshell-flake.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
inputs.devshell.url = "github:numtide/devshell";
2+
3+
inputs.nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
34
inputs.systems.url = "github:nix-systems/default";
45

6+
inputs.devshell.url = "github:numtide/devshell";
7+
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
8+
59
inputs.source.url = "path:./source";
610
inputs.source.flake = false;
711

templates/advanced/flake.toml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
[inputs.something]
2-
url = "path:./something"
1+
# Custom nixpkgs distribution
2+
[inputs.nixpkgs]
3+
url = "github:nixos/nixpkgs?ref=release-24.11"
4+
[inputs.devshell]
5+
url = "github:numtide/devshell"
6+
inputs.nixpkgs.follows = "nixpkgs"
7+
8+
# Custom exposed systems
9+
[inputs.systems]
10+
url = "path:./systems.nix"
11+
flake = false
312

13+
# non-flake dependency read by bat.nix
414
[inputs.file]
515
url = "path:./file"
616
flake = false
717

18+
# example flake exposing two overlays
19+
[inputs.something]
20+
url = "path:./something"
21+
22+
# load overlays
823
[[overlays]]
924
something = "foo"
1025
[[overlays]]
1126
something = "moo"
1227

1328
[nix-config]
14-
allowUnfree = true
29+
allowUnfree = true # because we want hello-unfree

templates/advanced/systems.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[ "x86_64-linux" ]

0 commit comments

Comments
 (0)