mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add general template
This commit is contained in:
parent
baeb65234b
commit
526b9acead
5 changed files with 33 additions and 19 deletions
|
|
@ -488,6 +488,7 @@ This file defines the templates that are being exposed by the flake. These can b
|
||||||
"rust"
|
"rust"
|
||||||
"go"
|
"go"
|
||||||
"cpp"
|
"cpp"
|
||||||
|
"default"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
lib.swarselsystems.mkTemplates templateNames
|
lib.swarselsystems.mkTemplates templateNames
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ let
|
||||||
"rust"
|
"rust"
|
||||||
"go"
|
"go"
|
||||||
"cpp"
|
"cpp"
|
||||||
|
"default"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
lib.swarselsystems.mkTemplates templateNames
|
lib.swarselsystems.mkTemplates templateNames
|
||||||
|
|
|
||||||
1
templates/default/.envrc
Normal file
1
templates/default/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
||||||
30
templates/default/flake.nix
Normal file
30
templates/default/flake.nix
Normal 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}; [
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -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
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue