-
Notifications
You must be signed in to change notification settings - Fork 16
dirty conversion to a flake #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
description = "Krops: Lightweight NixOS deployment toolkit"; | ||
|
||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: { | ||
lib = import ./lib { | ||
nixpkgsLib = nixpkgs.lib; | ||
}; | ||
} // (flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
populate = pkgs.callPackage ./pkgs/populate { | ||
inherit (self) lib; | ||
}; | ||
in { | ||
packages = (pkgs.callPackage ./pkgs/krops { | ||
inherit (self) lib; | ||
inherit populate; | ||
}); | ||
} | ||
)); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ nixpkgsLib }: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This breaks existing usage in the overlay. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The overlay doesn't really use lib, so this addition should not matter too much. Could we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We can probably get rid of it. I did a quick search and couldn't find any place where it gets used as overlay anyway. |
||
let { | ||
|
||
body = lib; | ||
|
@@ -79,6 +80,6 @@ let { | |
types = nixpkgs.lib.types // import ./types { lib = body; }; | ||
}; | ||
|
||
nixpkgs.lib = import <nixpkgs/lib>; | ||
nixpkgs.lib = nixpkgsLib; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We flakes you can build stuff like:
https://github.com/Mic92/dotfiles/blob/master/flake.nix#L55
https://github.com/Mic92/dotfiles/blob/master/nixos/krops.nix#L18