feat: add nix derivation declaration
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
node_modules/
|
||||
/dist/
|
||||
*.tar.gz
|
||||
result
|
||||
|
||||
21
flake.lock
generated
21
flake.lock
generated
@@ -1,5 +1,25 @@
|
||||
{
|
||||
"nodes": {
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1725983898,
|
||||
@@ -18,6 +38,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
||||
43
flake.nix
43
flake.nix
@@ -2,10 +2,16 @@
|
||||
description = "My development environment";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
gitignore = {
|
||||
url = "github:hercules-ci/gitignore.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
gitignore,
|
||||
...
|
||||
}: let
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
@@ -19,15 +25,34 @@
|
||||
in
|
||||
f system pkgs);
|
||||
in {
|
||||
nixosModules = {
|
||||
dot013-environment = import ./configuration.nix;
|
||||
default = self.nixosModules.dot013-environment;
|
||||
};
|
||||
homeManagerModules = {
|
||||
dot013-environment = import ./home.nix;
|
||||
default = self.homeManagerModules.dot013-environment;
|
||||
};
|
||||
homeManagerModule = self.homeManagerModules.dot013-environment;
|
||||
defaultPackage = forAllSystems (system: pkgs: let
|
||||
app = pkgs.buildNpmPackage rec {
|
||||
pname = "frappurccino-forgejo";
|
||||
version = "0.1.0";
|
||||
src = gitignore.lib.gitignoreSource ./.;
|
||||
|
||||
npmDepsHash = "sha256-4wArkv3O5rhuDlrUC05K1jIz2ZLdC8M48ILz+O+O7CU=";
|
||||
npmPackFlags = ["--ignore-scripts"];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
npm run build
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
cp -r dist $out/css
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in
|
||||
app);
|
||||
devShells = forAllSystems (system: pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
|
||||
5
package-lock.json
generated
5
package-lock.json
generated
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"name": "frappuccino-forgejo",
|
||||
"name": "fappurccino-forgejo",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "fappurccino-forgejo",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@catppuccin/palette": "^1.3.0",
|
||||
"sass": "^1.66.1"
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"name": "fappurccino-forgejo",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node ./build.js"
|
||||
|
||||
Reference in New Issue
Block a user