Minimum template
This commit is contained in:
commit
a6eff27454
25
flake.lock
Normal file
25
flake.lock
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697009197,
|
||||
"narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
11
flake.nix
Normal file
11
flake.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
description = "Some flake templates";
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
template.minimum = {
|
||||
path = ./minimum;
|
||||
description = "Minimal sane flake";
|
||||
welcomeText = "mjau‼";
|
||||
};
|
||||
};
|
||||
}
|
20
minimum.nix
Normal file
20
minimum.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
description = "A bare minimum flake";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (sys:
|
||||
let pkgs = nixpkgs.legacyPackages.${sys};
|
||||
deps = [ pkgs.cowsay ];
|
||||
package = pkgs.writeScriptBin "program" "echo mjau | ${pkgs.cowsay}/bin/cowsay -f hellokitty";
|
||||
in rec {
|
||||
packages.default = package;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = deps;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
20
minimum/flake.nix
Normal file
20
minimum/flake.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
description = "A bare minimum flake";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (sys:
|
||||
let pkgs = nixpkgs.legacyPackages.${sys};
|
||||
deps = [ pkgs.cowsay ];
|
||||
package = pkgs.writeScriptBin "program" "echo mjau | ${pkgs.cowsay}/bin/cowsay -f hellokitty";
|
||||
in rec {
|
||||
packages.default = package;
|
||||
devShells.default = pkgs.mkShell {
|
||||
packages = deps;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user