add flake devshell

This commit is contained in:
Osman Faruk Bayram 2025-01-14 17:46:31 +03:00
parent 27358b7426
commit 21b260ae37
2 changed files with 67 additions and 0 deletions

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1736817698,
"narHash": "sha256-1m+JP9RUsbeLVv/tF1DX3Ew9Vl/fatXnlh/g5k3jcSk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2b1fca3296ddd1602d2c4f104a4050e006f4b0cb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

40
flake.nix Normal file
View file

@ -0,0 +1,40 @@
{
description = "Development Shell For this repository";
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs =
{
nixpkgs,
... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
# TODO: i want to compile my keyboard using nix as a build system
devShells."${system}".default = pkgs.mkShell {
packages = with pkgs; [
keymapviz
qmk
];
shellHook = ''
echo 'Welcome to my keyboard development.'
'';
};
};
}