Refactor flake patching/recursion
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "asus-gu605c-acpi";
|
||||
version = "0.0.1";
|
||||
|
||||
@@ -17,12 +17,12 @@ pkgs.stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p kernel/firmware/acpi
|
||||
iasl -we -p kernel/firmware/acpi/${pname} ${src}
|
||||
find kernel | cpio -H newc -o > ${pname}.cpio
|
||||
iasl -we -p kernel/firmware/acpi/${finalAttrs.pname} ${finalAttrs.src}
|
||||
find kernel | cpio -H newc -o > ${finalAttrs.pname}.cpio
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${pname}.cpio $out/
|
||||
cp ${finalAttrs.pname}.cpio $out/
|
||||
'';
|
||||
}
|
||||
})
|
||||
|
@@ -24,8 +24,9 @@ in
|
||||
wireguard.interfaces.wg0 =
|
||||
let
|
||||
ip = "${pkgs.iproute2}/bin/ip";
|
||||
table = "wireguard";
|
||||
in
|
||||
rec {
|
||||
{
|
||||
ips = [
|
||||
"10.0.0.2/24"
|
||||
"${jupiterPublicIPv4}/32"
|
||||
@@ -33,7 +34,7 @@ in
|
||||
|
||||
privateKeyFile = config.sops.secrets."wireguard/client/vps".path;
|
||||
|
||||
table = "wireguard";
|
||||
inherit table;
|
||||
postSetup = [ "${ip} rule add from ${jupiterPublicIPv4} table ${table}" ];
|
||||
postShutdown = [ "${ip} rule del from ${jupiterPublicIPv4} table ${table}" ];
|
||||
|
||||
|
Reference in New Issue
Block a user