diff options
| author | seth <[email protected]> | 2024-10-16 21:18:46 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-10-16 23:23:33 -0400 |
| commit | 19b64bed1e31489de83f0c7d1b0ec1e77e3f7c49 (patch) | |
| tree | ab2d101836db1d44f09996a9bea7469dfe2ec80d /templates/basic | |
| parent | 43d30b3ea28ab03a2e6da5101dc2b84918f18c51 (diff) | |
templates: cleanup
Diffstat (limited to 'templates/basic')
| -rw-r--r-- | templates/basic/default.nix | 13 | ||||
| -rw-r--r-- | templates/basic/flake.nix | 70 |
2 files changed, 0 insertions, 83 deletions
diff --git a/templates/basic/default.nix b/templates/basic/default.nix deleted file mode 100644 index 16b3594..0000000 --- a/templates/basic/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - pkgs ? import nixpkgs { - inherit system; - config = { }; - overlays = [ ]; - }, - lib ? pkgs.lib, - nixpkgs ? <nixpkgs>, - system ? builtins.currentSystem, -}: -{ - inherit (pkgs) lib; -} 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; } - ); - }; -} |
