-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from dark-voyage/main
feat: nixification
- Loading branch information
Showing
4 changed files
with
127 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
description = "Telegram bot for Xinux community"; | ||
|
||
inputs = { | ||
# Too old to work with most libraries | ||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; | ||
|
||
# Perfect! | ||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; | ||
|
||
# The flake-utils library | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
}: | ||
flake-utils.lib.eachDefaultSystem | ||
( | ||
system: let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
in { | ||
# Nix script formatter | ||
formatter = pkgs.alejandra; | ||
|
||
# Development environment | ||
devShells.default = import ./shell.nix {inherit pkgs;}; | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{pkgs ? import <nixpkgs> {}}: let | ||
getLibFolder = pkg: "${pkg}/lib"; | ||
in | ||
pkgs.stdenv.mkDerivation { | ||
name = "devops-journey-shell"; | ||
|
||
buildInputs = with pkgs; [ | ||
# Package managers | ||
pnpm | ||
yarn | ||
|
||
# Runtime engines | ||
nodejs_22 | ||
|
||
# Nextjs dependencies | ||
vips | ||
]; | ||
|
||
shellHook = '' | ||
printf "Installing pnpm dependencies\n" | ||
pnpm install | ||
printf "Adding node_modules to PATH\n" | ||
export PATH="$PWD/node_modules/.bin/:$PATH" | ||
printf "Adding necessary aliases\n" | ||
alias scripts='jq ".scripts" package.json' | ||
''; | ||
} |