Skip to content

Commit

Permalink
basic nix flake configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Murazaki committed May 1, 2024
1 parent c2b74ba commit c890a4d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/.bash_profile
/.bashrc
/.composer
/.direnv
/.env
/.env.dottie-backup
#/.git
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
description = "Dev Environment flake";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:

let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.x86_64-linux.default = import ./shell.nix { inherit pkgs; };
};
}
10 changes: 10 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "pixelfed-nix-shell";
buildInputs = with pkgs; [ act docker php83Packages.composer nodejs nodePackages.npm ];
runScript = "$SHELL";
shellHook = ''
export PATH="$PWD/node_modules/.bin/:$PATH"
export PATH="$PWD/vendor/bin/:$PATH"
'';
}

0 comments on commit c890a4d

Please sign in to comment.