Format, move overlay to overlays to match ~/.config/nixpkgs/overlays/
This commit is contained in:
parent
a9590e3242
commit
695e095d44
|
@ -202,7 +202,7 @@
|
|||
extraHostRegistry.hosts = import ./host-registry.nix;
|
||||
hostRegistry = lib.recursiveUpdate zwHostRegistry extraHostRegistry;
|
||||
in {
|
||||
overlay = import ./overlay {
|
||||
overlay = import ./overlays {
|
||||
inherit nixos-unstable;
|
||||
inherit (inputs) tracer bevy-mandelbrot bevy-julia;
|
||||
};
|
||||
|
|
|
@ -33,12 +33,14 @@ with final; {
|
|||
postFixup = ''
|
||||
patchelf --set-rpath ${lib.makeLibraryPath buildInputs} $out/bin/allcolors-rs
|
||||
'';
|
||||
desktopItems = [ (makeDesktopItem {
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "allcolors";
|
||||
desktopName = "Polygon's allcolors-rs";
|
||||
categories = [ "Game" ];
|
||||
exec = "allcolors-rs";
|
||||
}) ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
inherit (bevy-julia.packages.${system}) bevy_julia;
|
||||
|
@ -128,5 +130,5 @@ with final; {
|
|||
else tracer.packages.${system}.tracer-game;
|
||||
|
||||
# vector-0.23 + mqtt-sink
|
||||
vector = pkgs-unstable.callPackage ./vector {};
|
||||
vector = pkgs-unstable.callPackage ./vector { };
|
||||
}
|
|
@ -1,19 +1,19 @@
|
|||
{
|
||||
gis-distance = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
groups = [ "default" ];
|
||||
platforms = [ ];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
remotes = [ "https://rubygems.org" ];
|
||||
sha256 = "1kgv1scv25b65d9xfricj1ayd2iry7imgk7qw4mryd91mhriibaf";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.1.0";
|
||||
};
|
||||
influxdb = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
groups = [ "default" ];
|
||||
platforms = [ ];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
remotes = [ "https://rubygems.org" ];
|
||||
sha256 = "1l2sjf8kaw3adjjg3l7zg1j735yxdfldf04gl9kjc3hbpdcd7d4w";
|
||||
type = "gem";
|
||||
};
|
|
@ -1,5 +1,7 @@
|
|||
{ fetchFromGitHub, rustPlatform
|
||||
, pkg-config, llvmPackages
|
||||
{ fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, llvmPackages
|
||||
, soapysdr-with-plugins
|
||||
}:
|
||||
|
|
@ -1,8 +1,18 @@
|
|||
{ naersk, fenix
|
||||
, curl, nodejs, rustPlatform
|
||||
, stdenv, fetchFromGitHub, buildEnv, fetchCrate
|
||||
, pkg-config, gettext, wasm-pack, binaryen
|
||||
, openssl, postgresql
|
||||
{ naersk
|
||||
, fenix
|
||||
, curl
|
||||
, nodejs
|
||||
, rustPlatform
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, buildEnv
|
||||
, fetchCrate
|
||||
, pkg-config
|
||||
, gettext
|
||||
, wasm-pack
|
||||
, binaryen
|
||||
, openssl
|
||||
, postgresql
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -80,7 +90,8 @@ let
|
|||
inherit src version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config gettext
|
||||
pkg-config
|
||||
gettext
|
||||
wasm-bindgen-cli
|
||||
];
|
||||
buildInputs = [
|
||||
|
@ -115,7 +126,10 @@ let
|
|||
pname = "plume-front";
|
||||
root = src;
|
||||
nativeBuildInputs = [
|
||||
gettext wasm-pack wasm-bindgen-cli binaryen
|
||||
gettext
|
||||
wasm-pack
|
||||
wasm-bindgen-cli
|
||||
binaryen
|
||||
];
|
||||
CARGO_BUILD_TARGET = "wasm32-unknown-unknown";
|
||||
cargoBuildOptions = x:
|
||||
|
@ -133,7 +147,8 @@ let
|
|||
'';
|
||||
};
|
||||
};
|
||||
in buildEnv {
|
||||
in
|
||||
buildEnv {
|
||||
name = "plume-env";
|
||||
paths = [ plume plume-front plm ];
|
||||
passthru = { inherit plume plm; };
|
|
@ -1,8 +1,13 @@
|
|||
{ stdenv, fetchFromGitHub
|
||||
, pkg-config, protobufc
|
||||
, ncurses, rrdtool, libusb1
|
||||
, libbladeRF, librtlsdr
|
||||
# , libad9361, libiio
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, protobufc
|
||||
, ncurses
|
||||
, rrdtool
|
||||
, libusb1
|
||||
, libbladeRF
|
||||
, librtlsdr
|
||||
# , libad9361, libiio
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "readsb-protobuf";
|
||||
|
@ -17,12 +22,16 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config protobufc
|
||||
pkg-config
|
||||
protobufc
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses rrdtool libusb1
|
||||
libbladeRF librtlsdr
|
||||
ncurses
|
||||
rrdtool
|
||||
libusb1
|
||||
libbladeRF
|
||||
librtlsdr
|
||||
# libad9361 libiio
|
||||
];
|
||||
|
|
@ -51,7 +51,7 @@ rustPlatform.buildRustPackage {
|
|||
TZDIR = "${tzdata}/share/zoneinfo";
|
||||
|
||||
# needed to dynamically link rdkafka
|
||||
CARGO_FEATURE_DYNAMIC_LINKING=1;
|
||||
CARGO_FEATURE_DYNAMIC_LINKING = 1;
|
||||
|
||||
buildNoDefaultFeatures = true;
|
||||
buildFeatures = features;
|
68
packages.nix
68
packages.nix
|
@ -16,15 +16,20 @@ let
|
|||
# allowing --override-input
|
||||
inputPaths = lib.escapeShellArgs (builtins.attrValues inputs);
|
||||
in
|
||||
lib.attrsets.mapAttrs (system: pkgs:
|
||||
let overlayPkgs = builtins.intersectAttrs (self.overlay {} {}) pkgs;
|
||||
in overlayPkgs //
|
||||
lib.attrsets.mapAttrs
|
||||
(system: pkgs:
|
||||
let
|
||||
overlayPkgs = builtins.intersectAttrs (self.overlay { } { }) pkgs;
|
||||
in
|
||||
overlayPkgs //
|
||||
{
|
||||
host-registry = pkgs.runCommand "host-registry"
|
||||
{
|
||||
host-registry = pkgs.runCommand "host-registry" {
|
||||
src = builtins.toFile "host-registry.nix" (
|
||||
lib.generators.toPretty {} hostRegistry
|
||||
lib.generators.toPretty { } hostRegistry
|
||||
);
|
||||
} ''
|
||||
}
|
||||
''
|
||||
ln -s $src $out
|
||||
'';
|
||||
|
||||
|
@ -65,9 +70,11 @@ lib.attrsets.mapAttrs (system: pkgs:
|
|||
'') (builtins.attrNames self.nixosConfigurations)}
|
||||
'';
|
||||
|
||||
prebuild-all = pkgs.runCommand "prebuild-all" {
|
||||
prebuild-all = pkgs.runCommand "prebuild-all"
|
||||
{
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
}
|
||||
''
|
||||
mkdir $out
|
||||
|
||||
${pkgs.lib.concatMapStrings (name: ''
|
||||
|
@ -90,16 +97,20 @@ lib.attrsets.mapAttrs (system: pkgs:
|
|||
|
||||
} //
|
||||
|
||||
builtins.foldl' (result: host: result // {
|
||||
builtins.foldl'
|
||||
(result: host: result // {
|
||||
# TODO: check if the ethernet address is reachable and if not,
|
||||
# execute wol on a machine in HQ.
|
||||
"${host}-wake" = pkgs.writeScriptBin "${host}-wake" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
exec ${pkgs.wol}/bin/wol ${hostRegistry.hosts."${host}".ether}
|
||||
'';
|
||||
}) {} (builtins.attrNames (lib.filterAttrs (_: { wol ? false, ... }: wol) hostRegistry.hosts)) //
|
||||
})
|
||||
{ }
|
||||
(builtins.attrNames (lib.filterAttrs (_: { wol ? false, ... }: wol) hostRegistry.hosts)) //
|
||||
|
||||
builtins.foldl' (result: name:
|
||||
builtins.foldl'
|
||||
(result: name:
|
||||
let
|
||||
host = getHostAddr name;
|
||||
target = ''root@"${host}"'';
|
||||
|
@ -108,7 +119,8 @@ lib.attrsets.mapAttrs (system: pkgs:
|
|||
# let /var/lib/microvm/*/flake point to the flake-update branch so that
|
||||
# `microvm -u $NAME` updates to what hydra built today.
|
||||
selfRef = "git+https://gitea.c3d2.de/c3d2/nix-config?ref=flake-update";
|
||||
in result // {
|
||||
in
|
||||
result // {
|
||||
# Generate a small script for copying this flake to the
|
||||
# remote machine and bulding and switching there.
|
||||
# Can be run with `nix run c3d2#…-nixos-rebuild switch`
|
||||
|
@ -257,31 +269,33 @@ lib.attrsets.mapAttrs (system: pkgs:
|
|||
ssh root@hydra.serv.zentralwerk.org -- \
|
||||
nomad run -detach $JOB
|
||||
'';
|
||||
}) {} (builtins.attrNames self.nixosConfigurations) //
|
||||
})
|
||||
{ }
|
||||
(builtins.attrNames self.nixosConfigurations) //
|
||||
|
||||
builtins.foldl' (result: host:
|
||||
builtins.foldl'
|
||||
(result: host:
|
||||
let
|
||||
inherit (self.nixosConfigurations.${host}) config;
|
||||
in
|
||||
result // {
|
||||
# boot any machine in a microvm
|
||||
"${host}-vm" = (self.nixosConfigurations.${host}
|
||||
.extendModules {
|
||||
modules = [ {
|
||||
"${host}-vm" = (self.nixosConfigurations.${host}.extendModules {
|
||||
modules = [{
|
||||
microvm = {
|
||||
mem = lib.mkForce 2048;
|
||||
hypervisor = lib.mkForce "qemu";
|
||||
socket = lib.mkForce null;
|
||||
shares = lib.mkForce [ {
|
||||
shares = lib.mkForce [{
|
||||
tag = "ro-store";
|
||||
source = "/nix/store";
|
||||
mountPoint = "/nix/.ro-store";
|
||||
} ];
|
||||
interfaces = lib.mkForce [ {
|
||||
}];
|
||||
interfaces = lib.mkForce [{
|
||||
type = "user";
|
||||
id = "eth0";
|
||||
mac = "02:23:de:ad:be:ef";
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
boot.isContainer = lib.mkForce false;
|
||||
users.users.root.password = "";
|
||||
|
@ -290,16 +304,18 @@ lib.attrsets.mapAttrs (system: pkgs:
|
|||
Log in as "root" with an empty password.
|
||||
Use "reboot" to shut qemu down.
|
||||
'';
|
||||
} ] ++ lib.optionals (! config ? microvm) [
|
||||
}] ++ lib.optionals (! config ? microvm) [
|
||||
microvm.nixosModules.microvm
|
||||
];
|
||||
})
|
||||
.config.microvm.declaredRunner;
|
||||
}).config.microvm.declaredRunner;
|
||||
|
||||
"${host}-tftproot" =
|
||||
if config.system.build ? tftproot
|
||||
then config.system.build.tftproot
|
||||
else lib.trace "No tftproot for ${host}" null;
|
||||
}
|
||||
) {} (builtins.attrNames self.nixosConfigurations)
|
||||
) self.legacyPackages
|
||||
)
|
||||
{ }
|
||||
(builtins.attrNames self.nixosConfigurations)
|
||||
)
|
||||
self.legacyPackages
|
||||
|
|
Loading…
Reference in New Issue