From a6eff2745463a014637e72ce41de1de25fc875d9 Mon Sep 17 00:00:00 2001 From: xenia Date: Thu, 12 Oct 2023 15:15:57 +0200 Subject: [PATCH] Minimum template --- flake.lock | 25 +++++++++++++++++++++++++ flake.nix | 11 +++++++++++ minimum.nix | 20 ++++++++++++++++++++ minimum/flake.nix | 20 ++++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 minimum.nix create mode 100644 minimum/flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..73f8551 --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..34062b4 --- /dev/null +++ b/flake.nix @@ -0,0 +1,11 @@ +{ + description = "Some flake templates"; + + outputs = { self, nixpkgs }: { + template.minimum = { + path = ./minimum; + description = "Minimal sane flake"; + welcomeText = "mjauā€¼"; + }; + }; +} diff --git a/minimum.nix b/minimum.nix new file mode 100644 index 0000000..9f9f85f --- /dev/null +++ b/minimum.nix @@ -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; + }; + } + ); +} diff --git a/minimum/flake.nix b/minimum/flake.nix new file mode 100644 index 0000000..9f9f85f --- /dev/null +++ b/minimum/flake.nix @@ -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; + }; + } + ); +}