mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 03:26:13 +01:00
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
{
|
|
inputs = {
|
|
# Not a flake
|
|
};
|
|
|
|
outputs = { self, nixpkgs, rlib, ... }@inputs:
|
|
let
|
|
supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
|
|
in
|
|
{
|
|
overlay = system: final: prev:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
with final;
|
|
{
|
|
gpg-key =
|
|
let
|
|
gpg-key = rlib.substitute {
|
|
runCommand = pkgs.runCommandNoCCLocal;
|
|
name = "gpg-key";
|
|
inFile = ./gpg-key;
|
|
vars = {
|
|
cryptsetup = "${pkgs.cryptsetup}/bin/cryptsetup";
|
|
rm = "${pkgs.coreutils}/bin/rm";
|
|
ls = "${pkgs.coreutils}/bin/ls";
|
|
mkdir = "${pkgs.coreutils}/bin/mkdir";
|
|
};
|
|
};
|
|
in
|
|
pkgs.writeShellScriptBin
|
|
"gpg-key"
|
|
(builtins.readFile "${gpg-key}");
|
|
|
|
};
|
|
|
|
defaultPackage = forAllSystems (system: (import nixpkgs {
|
|
inherit system;
|
|
overlays = [ (self.overlay system) ];
|
|
}).gpg-key);
|
|
};
|
|
}
|