feat: remove rss, status, and badge features
This commit is contained in:
parent
553d7d1780
commit
36720e2ba5
21 changed files with 904 additions and 1200 deletions
58
flake.nix
58
flake.nix
|
|
@ -14,7 +14,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, agenix, crane, rust-overlay }:
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
agenix,
|
||||
crane,
|
||||
rust-overlay,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
|
|
@ -22,15 +29,13 @@
|
|||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
|
||||
# --- Remote services (x86_64-linux) ---
|
||||
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
|
||||
|
||||
src = pkgs.lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter = path: type:
|
||||
(builtins.match ".*\.png$" path != null) || (craneLib.filterCargoSources path type);
|
||||
filter =
|
||||
path: type: (builtins.match ".*\.png$" path != null) || (craneLib.filterCargoSources path type);
|
||||
};
|
||||
|
||||
remoteArgs = {
|
||||
|
|
@ -43,16 +48,18 @@
|
|||
|
||||
remoteArtifacts = craneLib.buildDepsOnly remoteArgs;
|
||||
|
||||
buildRemoteMember = name: craneLib.buildPackage (remoteArgs // {
|
||||
cargoArtifacts = remoteArtifacts;
|
||||
cargoExtraArgs = "-p ${name}";
|
||||
});
|
||||
buildRemoteMember =
|
||||
name:
|
||||
craneLib.buildPackage (
|
||||
remoteArgs
|
||||
// {
|
||||
cargoArtifacts = remoteArtifacts;
|
||||
cargoExtraArgs = "-p ${name}";
|
||||
}
|
||||
);
|
||||
|
||||
noisebell-cache = buildRemoteMember "noisebell-cache";
|
||||
noisebell-discord = buildRemoteMember "noisebell-discord";
|
||||
noisebell-rss = buildRemoteMember "noisebell-rss";
|
||||
|
||||
# --- Pi service (cross-compiled to aarch64-linux) ---
|
||||
|
||||
crossPkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
|
@ -74,8 +81,7 @@
|
|||
doCheck = false;
|
||||
|
||||
CARGO_BUILD_TARGET = "aarch64-unknown-linux-gnu";
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER =
|
||||
"${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
TARGET_CC = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
CC_aarch64_unknown_linux_gnu = "${crossPkgs.stdenv.cc.targetPrefix}cc";
|
||||
HOST_CC = "${pkgs.stdenv.cc.nativePrefix}cc";
|
||||
|
|
@ -86,14 +92,16 @@
|
|||
|
||||
piArtifacts = piCraneLib.buildDepsOnly piArgs;
|
||||
|
||||
noisebell-pi = piCraneLib.buildPackage (piArgs // {
|
||||
cargoArtifacts = piArtifacts;
|
||||
});
|
||||
|
||||
noisebell-pi = piCraneLib.buildPackage (
|
||||
piArgs
|
||||
// {
|
||||
cargoArtifacts = piArtifacts;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
packages.${system} = {
|
||||
inherit noisebell-cache noisebell-discord noisebell-rss;
|
||||
inherit noisebell-cache noisebell-discord;
|
||||
default = noisebell-cache;
|
||||
};
|
||||
|
||||
|
|
@ -105,12 +113,12 @@
|
|||
nixosModules = {
|
||||
cache = import ./remote/cache-service/module.nix noisebell-cache;
|
||||
discord = import ./remote/discord-bot/module.nix noisebell-discord;
|
||||
rss = import ./remote/rss-service/module.nix noisebell-rss;
|
||||
default = { imports = [
|
||||
(import ./remote/cache-service/module.nix noisebell-cache)
|
||||
(import ./remote/discord-bot/module.nix noisebell-discord)
|
||||
(import ./remote/rss-service/module.nix noisebell-rss)
|
||||
]; };
|
||||
default = {
|
||||
imports = [
|
||||
(import ./remote/cache-service/module.nix noisebell-cache)
|
||||
(import ./remote/discord-bot/module.nix noisebell-discord)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations.pi = nixpkgs.lib.nixosSystem {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue