mirror of
https://github.com/ItsDrike/itsdrike.com.git
synced 2025-01-23 12:04:35 +00:00
Add nix dev-shell
This commit is contained in:
parent
532da8ef86
commit
968bc2e532
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -28,3 +28,6 @@ TODO
|
|||
|
||||
# Cheatsheet post used for debugging post pages
|
||||
content/posts/cheatsheet.md
|
||||
|
||||
# Nix direnv
|
||||
.direnv
|
||||
|
|
26
flake.lock
Normal file
26
flake.lock
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721306924,
|
||||
"narHash": "sha256-DKOCd7Gk+brIn/3fkL3UlIpK4wmXLfHKeTGsjzJ1jPA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a0812b380b9d17e9dd02b677e4052bf446b97cbe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
29
flake.nix
Normal file
29
flake.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "My personal website (itsdrike.com)";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
inherit (nixpkgs) lib;
|
||||
pkgsFor = system: import nixpkgs {inherit system;};
|
||||
|
||||
targetSystems = ["aarch64-linux" "x86_64-linux"];
|
||||
in {
|
||||
devShells = lib.genAttrs targetSystems (system: let
|
||||
pkgs = pkgsFor system;
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
bash
|
||||
coreutils
|
||||
hugo
|
||||
nodePackages.npm
|
||||
];
|
||||
};
|
||||
});
|
||||
|
||||
formatter = lib.genAttrs targetSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue