add flake.nix

This commit is contained in:
linuswck 2025-05-26 11:46:48 +08:00
parent 559692f29d
commit 3563b5bce0
2 changed files with 49 additions and 0 deletions

27
flake.lock generated Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1748162331,
"narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View File

@ -0,0 +1,22 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
outputs =
{
nixpkgs,
...
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
formatter.x86_64-linux = pkgs.nixfmt-rfc-style;
devShells.${system}.default = pkgs.mkShell {
name = "dev-shell";
packages = [
pkgs.kicad
pkgs.freecad
];
};
};
}