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,20 +1,29 @@
{ {
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 = inherit inputs;
let }
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{ {
${system}.default = pkgs.mkShellNoCC { systems = [
packages = with pkgs; [ "x86_64-linux"
deno "aarch64-linux"
];
perSystem =
{ pkgs, ... }:
{
devShells.default = pkgs.mkShellNoCC {
packages = [
pkgs.deno
pkgs.nil # Nix language server pkgs.nil # Nix language server
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style
]; ];