Skip to content

Commit b84a154

Browse files
committed
First commit; add default flake template
0 parents  commit b84a154

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

default/.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

default/flake.nix

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
description = "An empty flake template that you can adapt to your own environment";
3+
4+
# Flake inputs
5+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0"; # Stable Nixpkgs
6+
7+
# Flake outputs
8+
outputs =
9+
inputs:
10+
let
11+
# The systems supported for this flake's outputs
12+
supportedSystems = [
13+
"x86_64-linux" # 64-bit Intel/AMD Linux
14+
"aarch64-linux" # 64-bit ARM Linux
15+
"x86_64-darwin" # 64-bit Intel macOS
16+
"aarch64-darwin" # 64-bit ARM macOS
17+
];
18+
19+
# Helper for providing system-specific attributes
20+
forEachSupportedSystem =
21+
f:
22+
inputs.nixpkgs.lib.genAttrs supportedSystems (
23+
system:
24+
f {
25+
pkgs = import inputs.nixpkgs { inherit system; };
26+
}
27+
);
28+
in
29+
{
30+
# Development environments output by this flake
31+
devShells = forEachSupportedSystem (
32+
{ pkgs }:
33+
{
34+
# Run `nix develop` to activate this environment or `direnv allow` if you have direnv installed
35+
default = pkgs.mkShell {
36+
# The Nix packages provided in the environment
37+
packages = with pkgs; [ ];
38+
39+
# Set any environment variables for your development environment
40+
env = { };
41+
42+
# Add any shell logic you want executed when the environment is activated
43+
shellHook = "";
44+
};
45+
}
46+
);
47+
};
48+
}

flake.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
description = "Determinate Systems flake templates";
3+
4+
outputs =
5+
{ self, ... }@inputs:
6+
{
7+
templates = {
8+
default = {
9+
description = "Default flake template";
10+
path = ./default;
11+
};
12+
};
13+
};
14+
}

0 commit comments

Comments
 (0)