From efbf64c10ff63f55928e4692d1884588fc7a22f7 Mon Sep 17 00:00:00 2001 From: twoneis Date: Sun, 14 Apr 2024 02:02:59 +0200 Subject: [PATCH] added simple flakes to start with --- fhs/flake.nix | 23 +++++++++++++++++++++++ flake.nix | 2 +- trivial/flake.nix | 18 ++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 fhs/flake.nix create mode 100644 trivial/flake.nix diff --git a/fhs/flake.nix b/fhs/flake.nix new file mode 100644 index 0000000..cfc5df3 --- /dev/null +++ b/fhs/flake.nix @@ -0,0 +1,23 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, nixpkgs-python, ... }@inputs: inputs.utils.lib.eachSystem [ + "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" + ] (system: let + pkgs = import nixpkgs { + inherit system; + }; + fhs = pkgs.buildFHSUserEnv { + targetPkgs = pkgs: [ ]; + + runScript = '' + zsh + ''; + }; + in { + devShells.default = fhs.env; + }); +} diff --git a/flake.nix b/flake.nix index 1ffdfe2..0b1a361 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { description = "My collection of flake templates"; - outputs = { }: { + outputs = { self }: { trivial = { path = ./trivial; description = "The default flake template most non-specialised flakes should be based on"; diff --git a/trivial/flake.nix b/trivial/flake.nix new file mode 100644 index 0000000..fdb0368 --- /dev/null +++ b/trivial/flake.nix @@ -0,0 +1,18 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, ... }@inputs: inputs.utils.lib.eachSystem [ + "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" + ] (system: let + pkgs = import nixpkgs { + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + packages = [ ]; + }; + }); +}