add overlay
This commit is contained in:
parent
d938ad0118
commit
da5dffa056
3 changed files with 13 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
outputs = { self, nixpkgs, flake-utils, mach-nix, ... }: {
|
||||
nixosModules.peerix = import ./module.nix;
|
||||
overlay = import ./overlay.nix { inherit self; };
|
||||
} // flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system}; in {
|
||||
packages.peerix = mach-nix.lib.${system}.buildPythonApplication {
|
||||
|
|
11
module.nix
11
module.nix
|
@ -1,8 +1,6 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.peerix;
|
||||
|
||||
peerix = (import ./default.nix).default;
|
||||
in
|
||||
{
|
||||
options = with lib; {
|
||||
|
@ -70,6 +68,13 @@ in
|
|||
By default not given, as it affects the UX of the nix installation.
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = (import ./default.nix).default or pkgs.peerix;
|
||||
defaultText = literalExpression "pkgs.peerix";
|
||||
description = "The package to use for peerix";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -132,7 +137,7 @@ in
|
|||
];
|
||||
};
|
||||
script = ''
|
||||
exec ${peerix}/bin/peerix
|
||||
exec ${cfg.package}/bin/peerix
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
4
overlay.nix
Normal file
4
overlay.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ self }:
|
||||
final: prev: {
|
||||
peerix = self.packages.${prev.system}.peerix;
|
||||
}
|
Loading…
Reference in a new issue