Skip to content

Commit

Permalink
Commented up flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
max-amb committed Nov 6, 2024
1 parent 485ad31 commit 1e1aafc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
{
# Description of the application
description = "A tool for viewing and editing your nix configuration as a tree";

# Importing nixpkgs (the package repository) and poetry for building the application
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
poetry2nix.url = "github:nix-community/poetry2nix";
};

outputs = { self, nixpkgs, poetry2nix }:
let
# Setting system to 64 bit linux
system = "x86_64-linux";

# Adding poetry to our nixpkgs, and setting the pkgs variable as this
pkgs = nixpkgs.legacyPackages.${system}.extend poetry2nix.overlays.default;

# Setting the lib variable (for licenses and maintainers)
lib = nixpkgs.lib;

# Extract mkPoetryApplication from mkPoetry2Nix for buikding our application
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
in
{
# The section that builds our application
defaultPackage.x86_64-linux = mkPoetryApplication {
type = "app";

# The project is found at the root of the repository
projectDir = ./.;

# To copy over the full options json
Expand Down

0 comments on commit 1e1aafc

Please sign in to comment.