initial commit

This commit is contained in:
Amy de Buitléir 2025-09-04 20:40:25 +01:00
parent 24e71423e4
commit 5e2da971de
4 changed files with 122 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
hello-flake.url = "git+https://codeberg.org/mhwombat/hello-flake";
};
outputs = { self, nixpkgs, flake-utils, hello-flake }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells = rec {
default = pkgs.mkShell {
buildInputs = [ hello-flake.packages.${system}.hello ];
};
};
}
);
}

View file

@ -0,0 +1,31 @@
= A top level package from the Nixpkgs/NixOS repo
////
$ mkdir tempwork
$ cd tempwork
$ cp ../flake.nix flake.nix
$ git add flake.nix
$ nix develop
$ git add flake.lock
$ git commit -a -m temp
////
[source,nix,linenums,highlight=15]
.flake.nix
....
$# cat flake.nix
....
Here's a demonstration using the shell.
....
$ cowsay "Moo!"
$# ../../../../../start-shell nix develop <<EOL
$ cowsay "Moo!"
$# EOL
....
////
Good adoc0 scripts clean up after themselves.
$ cd .. ; rm -rf tempwork # clean up
////