mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-05-12 06:45:53 +08:00
initial commit
This commit is contained in:
parent
9997760554
commit
4c3ab29f45
5 changed files with 34 additions and 0 deletions
20
source/recipes/devshell/nixpkg/flake.nix
Normal file
20
source/recipes/devshell/nixpkg/flake.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShells = rec {
|
||||
default = pkgs.mkShell {
|
||||
packages = [ pkgs.cowsay ];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
3
source/recipes/shebang/run-flake.sh
Executable file
3
source/recipes/shebang/run-flake.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env nix
|
||||
#! nix shell git+https://codeberg.org/mhwombat/hello-flake --command bash
|
||||
hello-flake
|
||||
4
source/recipes/shebang/run-nixpkg-old.sh
Executable file
4
source/recipes/shebang/run-nixpkg-old.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p "[hello cowsay]"
|
||||
hello
|
||||
cowsay "Pretty cool, huh?"
|
||||
4
source/recipes/shebang/run-nixpkg.sh
Executable file
4
source/recipes/shebang/run-nixpkg.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /usr/bin/env nix
|
||||
#! nix shell nixpkgs#hello nixpkgs#cowsay --command bash
|
||||
hello
|
||||
cowsay "Pretty cool, huh?"
|
||||
3
source/recipes/shebang/run-non-flake.sh
Executable file
3
source/recipes/shebang/run-non-flake.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env nix
|
||||
#! nix shell git+https://codeberg.org/mhwombat/hello-flake --command bash
|
||||
hello-flake
|
||||
Loading…
Add table
Add a link
Reference in a new issue