brianmcgee commited on
Commit
f6da359
·
unverified ·
1 Parent(s): ca3ea9d

feat: init blueprint

Browse files
Files changed (4) hide show
  1. devshell.nix +13 -0
  2. flake.lock +88 -0
  3. flake.nix +18 -5
  4. formatter.nix +52 -0
devshell.nix ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ { pkgs }:
2
+ pkgs.mkShell {
3
+ # Add build dependencies
4
+ packages = [ ];
5
+
6
+ # Add environment variables
7
+ env = { };
8
+
9
+ # Load custom bash code
10
+ shellHook = ''
11
+
12
+ '';
13
+ }
flake.lock ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nodes": {
3
+ "blueprint": {
4
+ "inputs": {
5
+ "nixpkgs": [
6
+ "nixpkgs"
7
+ ],
8
+ "systems": [
9
+ "systems"
10
+ ]
11
+ },
12
+ "locked": {
13
+ "lastModified": 1767386128,
14
+ "narHash": "sha256-BJDu7dIMauO2nYRSL4aI8wDNtEm2KOb7lDKP3hxdrpo=",
15
+ "owner": "numtide",
16
+ "repo": "blueprint",
17
+ "rev": "0ed984d51a3031065925ab08812a5434f40b93d4",
18
+ "type": "github"
19
+ },
20
+ "original": {
21
+ "owner": "numtide",
22
+ "repo": "blueprint",
23
+ "type": "github"
24
+ }
25
+ },
26
+ "nixpkgs": {
27
+ "locked": {
28
+ "lastModified": 1767767207,
29
+ "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
30
+ "owner": "NixOS",
31
+ "repo": "nixpkgs",
32
+ "rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
33
+ "type": "github"
34
+ },
35
+ "original": {
36
+ "owner": "NixOS",
37
+ "ref": "nixos-unstable",
38
+ "repo": "nixpkgs",
39
+ "type": "github"
40
+ }
41
+ },
42
+ "root": {
43
+ "inputs": {
44
+ "blueprint": "blueprint",
45
+ "nixpkgs": "nixpkgs",
46
+ "systems": "systems",
47
+ "treefmt-nix": "treefmt-nix"
48
+ }
49
+ },
50
+ "systems": {
51
+ "locked": {
52
+ "lastModified": 1689347949,
53
+ "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
54
+ "owner": "nix-systems",
55
+ "repo": "default-linux",
56
+ "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
57
+ "type": "github"
58
+ },
59
+ "original": {
60
+ "owner": "nix-systems",
61
+ "repo": "default-linux",
62
+ "type": "github"
63
+ }
64
+ },
65
+ "treefmt-nix": {
66
+ "inputs": {
67
+ "nixpkgs": [
68
+ "nixpkgs"
69
+ ]
70
+ },
71
+ "locked": {
72
+ "lastModified": 1767801790,
73
+ "narHash": "sha256-QfX6g3Wj2vQe7oBJEbTf0npvC6sJoDbF9hb2+gM5tf8=",
74
+ "owner": "numtide",
75
+ "repo": "treefmt-nix",
76
+ "rev": "778a1d691f1ef45dd68c661715c5bf8cbf131c80",
77
+ "type": "github"
78
+ },
79
+ "original": {
80
+ "owner": "numtide",
81
+ "repo": "treefmt-nix",
82
+ "type": "github"
83
+ }
84
+ }
85
+ },
86
+ "root": "root",
87
+ "version": 7
88
+ }
flake.nix CHANGED
@@ -2,14 +2,27 @@
2
  description = "A very basic flake";
3
 
4
  inputs = {
5
- nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
6
- };
7
 
8
- outputs = { self, nixpkgs }: {
 
 
 
 
9
 
10
- packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello;
11
 
12
- packages.x86_64-linux.default = self.packages.x86_64-linux.hello;
13
 
 
 
 
 
14
  };
 
 
 
 
 
 
 
15
  }
 
2
  description = "A very basic flake";
3
 
4
  inputs = {
 
 
5
 
6
+ blueprint = {
7
+ url = "github:numtide/blueprint";
8
+ inputs.nixpkgs.follows = "nixpkgs";
9
+ inputs.systems.follows = "systems";
10
+ };
11
 
12
+ nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
13
 
14
+ systems.url = "github:nix-systems/default-linux";
15
 
16
+ treefmt-nix = {
17
+ url = "github:numtide/treefmt-nix";
18
+ inputs.nixpkgs.follows = "nixpkgs";
19
+ };
20
  };
21
+
22
+ # Load the blueprint
23
+ outputs =
24
+ inputs:
25
+ inputs.blueprint {
26
+ inherit inputs;
27
+ };
28
  }
formatter.nix ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ pkgs,
3
+ flake,
4
+ inputs,
5
+ }:
6
+ let
7
+ mod = inputs.treefmt-nix.lib.evalModule pkgs {
8
+ projectRootFile = ".git/config";
9
+
10
+ programs = {
11
+ nixfmt.enable = true;
12
+ deadnix.enable = true;
13
+ prettier.enable = true;
14
+ statix.enable = true;
15
+ shellcheck.enable = true;
16
+ };
17
+
18
+ settings = {
19
+ global.excludes = [
20
+ "LICENSE"
21
+ # unsupported extensions
22
+ "*.{gif,png,svg,tape,mts,lock,mod,sum,toml,env,envrc,gitignore}"
23
+ ];
24
+
25
+ formatter = {
26
+ deadnix = {
27
+ priority = 1;
28
+ };
29
+
30
+ statix = {
31
+ priority = 2;
32
+ };
33
+
34
+ nixfmt = {
35
+ priority = 3;
36
+ };
37
+
38
+ prettier = {
39
+ options = [
40
+ "--tab-width"
41
+ "4"
42
+ ];
43
+ includes = [ "*.{css,html,js,json,jsx,md,mdx,scss,ts,yaml}" ];
44
+ };
45
+ };
46
+ };
47
+ };
48
+ in
49
+ mod.config.build.wrapper
50
+ // {
51
+ passthru.tests.check = mod.config.build.check flake;
52
+ }