@@ -10,20 +10,22 @@
|
|||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
(
|
{
|
||||||
|
overlays.default = import ./overlay;
|
||||||
|
}
|
||||||
|
// (
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [ inputs.self.overlays.default ];
|
||||||
};
|
};
|
||||||
|
|
||||||
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmt = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
lib.${system} = import ./lib { inherit pkgs; };
|
|
||||||
|
|
||||||
formatter.${system} = treefmt.config.build.wrapper;
|
formatter.${system} = treefmt.config.build.wrapper;
|
||||||
checks.${system}.formatting = treefmt.config.build.check inputs.self;
|
checks.${system}.formatting = treefmt.config.build.check inputs.self;
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
callPackage = pkgs.lib.callPackageWith { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
fetchers = callPackage ./fetchers { };
|
|
||||||
runtime = callPackage ./runtime { };
|
|
||||||
}
|
|
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
callPackage = pkgs.lib.callPackageWith { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
sshKnownHosts = callPackage ./sshKnownHosts { };
|
|
||||||
}
|
|
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
callPackage = pkgs.lib.callPackageWith { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
merge = callPackage ./merge { };
|
|
||||||
}
|
|
@@ -1,7 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
callPackage = pkgs.lib.callPackageWith { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
keyValue = callPackage ./keyValue { };
|
|
||||||
}
|
|
14
overlay/default.nix
Normal file
14
overlay/default.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
final: prev:
|
||||||
|
{
|
||||||
|
lib = prev.lib.recursiveUpdate prev.lib {
|
||||||
|
fetchers = {
|
||||||
|
sshKnownHosts = import ./fetchers/sshKnownHosts final prev;
|
||||||
|
};
|
||||||
|
|
||||||
|
runtime = {
|
||||||
|
merge = {
|
||||||
|
keyValue = import ./runtime/merge/keyValue final prev;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
{ pkgs, ... }:
|
final: prev:
|
||||||
pkgs.lib.fetchers.withNormalizedHash { } (
|
prev.lib.fetchers.withNormalizedHash { } (
|
||||||
{
|
{
|
||||||
host,
|
host,
|
||||||
name ? "ssh-known-hosts-${host}",
|
name ? "ssh-known-hosts-${host}",
|
||||||
@@ -13,15 +13,15 @@ pkgs.lib.fetchers.withNormalizedHash { } (
|
|||||||
],
|
],
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
keyTypeArgs = pkgs.lib.concatStringsSep "," keyTypes;
|
keyTypeArgs = prev.lib.concatStringsSep "," keyTypes;
|
||||||
in
|
in
|
||||||
pkgs.runCommandLocal name
|
prev.runCommandLocal name
|
||||||
{
|
{
|
||||||
inherit outputHash outputHashAlgo;
|
inherit outputHash outputHashAlgo;
|
||||||
outputHashMode = "flat";
|
outputHashMode = "flat";
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with final; [
|
||||||
openssh
|
openssh
|
||||||
gnugrep
|
gnugrep
|
||||||
coreutils
|
coreutils
|
@@ -1,8 +1,8 @@
|
|||||||
{ pkgs, ... }:
|
final: prev:
|
||||||
"${
|
"${
|
||||||
pkgs.writeShellApplication {
|
prev.writeShellApplication {
|
||||||
name = "merge-key-value";
|
name = "merge-key-value";
|
||||||
runtimeInputs = with pkgs; [
|
runtimeInputs = with final; [
|
||||||
coreutils
|
coreutils
|
||||||
gawk
|
gawk
|
||||||
];
|
];
|
Reference in New Issue
Block a user