summaryrefslogtreecommitdiff
path: root/templates/basic/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-10-16 21:18:46 -0400
committerseth <[email protected]>2024-10-16 23:23:33 -0400
commit19b64bed1e31489de83f0c7d1b0ec1e77e3f7c49 (patch)
treeab2d101836db1d44f09996a9bea7469dfe2ec80d /templates/basic/flake.nix
parent43d30b3ea28ab03a2e6da5101dc2b84918f18c51 (diff)
templates: cleanup
Diffstat (limited to 'templates/basic/flake.nix')
-rw-r--r--templates/basic/flake.nix70
1 files changed, 0 insertions, 70 deletions
diff --git a/templates/basic/flake.nix b/templates/basic/flake.nix
deleted file mode 100644
index 86efae0..0000000
--- a/templates/basic/flake.nix
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- description = "";
-
- inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- };
-
- outputs =
- { self, nixpkgs }:
- let
- inherit (nixpkgs) lib;
- systems = [
- "x86_64-linux"
- "aarch64-linux"
- "x86_64-darwin"
- "aarch64-darwin"
- ];
-
- forAllSystems = lib.genAttrs systems;
- nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
- in
- {
- checks = forAllSystems (
- system:
- let
- pkgs = nixpkgsFor.${system};
- in
- {
- nixfmt = pkgs.runCommand "check-nixfmt" ''
- cd ${self}
-
- echo "Running nixfmt..."
- ${lib.getExe self.formatter.${system}}--check .
-
- touch $out
- '';
- }
- );
-
- devShells = forAllSystems (
- system:
- let
- pkgs = nixpkgsFor.${system};
- in
- {
- default = pkgs.mkShell {
- packages = [ pkgs.bash ];
-
- inputsFrom = [ self.packages.${system}.hello ];
- };
- }
- );
-
- formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
-
- packages = forAllSystems (
- system:
- let
- pkgs = import ./. {
- inherit system nixpkgs lib;
- pkgs = nixpkgsFor.${system};
- };
-
- isAvailable = lib.meta.availableOn { inherit system; };
- pkgs' = lib.filterAttrs (_: isAvailable) pkgs;
- in
- pkgs // { default = pkgs'.hello; }
- );
- };
-}