add nix flake

This commit is contained in:
2025-10-01 20:51:51 +02:00
parent 8dcfb652b6
commit c7a043c594
2 changed files with 46 additions and 16 deletions

21
flake.lock generated
View File

@@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746904237, "lastModified": 1746904237,
@@ -18,6 +38,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@@ -1,24 +1,33 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
}; };
outputs = outputs =
{ nixpkgs, ... }: inputs@{ flake-parts, ... }:
{ flake-parts.lib.mkFlake
devShells = {
let inherit inputs;
system = "x86_64-linux"; }
pkgs = import nixpkgs { inherit system; }; {
in systems = [
{ "x86_64-linux"
${system}.default = pkgs.mkShellNoCC { "aarch64-linux"
packages = with pkgs; [ ];
deno
pkgs.nil # Nix language server perSystem =
pkgs.nixfmt-rfc-style { pkgs, ... }:
]; {
devShells.default = pkgs.mkShellNoCC {
packages = [
pkgs.deno
pkgs.nil # Nix language server
pkgs.nixfmt-rfc-style
];
};
}; };
}; };
};
} }