Minimum template

This commit is contained in:
xenia 2023-10-12 15:15:57 +02:00
commit a6eff27454
4 changed files with 76 additions and 0 deletions

25
flake.lock Normal file
View 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
View 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
View 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
View 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;
};
}
);
}