feat: add general template

This commit is contained in:
Leon Schwarzäugl 2024-12-31 17:55:08 +01:00
parent baeb65234b
commit 526b9acead
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
5 changed files with 33 additions and 19 deletions

View file

@ -5,6 +5,7 @@ let
"rust"
"go"
"cpp"
"default"
];
in
lib.swarselsystems.mkTemplates templateNames

1
templates/default/.envrc Normal file
View file

@ -0,0 +1 @@
use flake

View file

@ -0,0 +1,30 @@
{
description = "General purpose Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{ nixpkgs
, systems
, ...
}:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
in
{
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with pkgsFor.${system}; [
];
};
});
};
}

View file

@ -1,19 +0,0 @@
{
description = "General Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
# fill here
];
};
};
}