feat: reorganize with remote
This commit is contained in:
parent
a74e5753fa
commit
dc7b8cbadd
28 changed files with 622 additions and 3024 deletions
|
|
@ -3,21 +3,62 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
noisebell-cache.url = "path:./cache-service";
|
||||
noisebell-discord.url = "path:./discord-bot";
|
||||
noisebell-rss.url = "path:./rss-service";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, noisebell-cache, noisebell-discord, noisebell-rss }: {
|
||||
nixosModules = {
|
||||
cache = noisebell-cache.nixosModules.default;
|
||||
discord = noisebell-discord.nixosModules.default;
|
||||
rss = noisebell-rss.nixosModules.default;
|
||||
default = { imports = [
|
||||
noisebell-cache.nixosModules.default
|
||||
noisebell-discord.nixosModules.default
|
||||
noisebell-rss.nixosModules.default
|
||||
]; };
|
||||
crane.url = "github:ipetkov/crane";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, crane, rust-overlay }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ rust-overlay.overlays.default ];
|
||||
};
|
||||
|
||||
rustToolchain = pkgs.rust-bin.stable.latest.default;
|
||||
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
|
||||
|
||||
src = craneLib.cleanCargoSource ./.;
|
||||
|
||||
commonArgs = {
|
||||
inherit src;
|
||||
strictDeps = true;
|
||||
doCheck = false;
|
||||
};
|
||||
|
||||
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
||||
|
||||
buildMember = name: craneLib.buildPackage (commonArgs // {
|
||||
inherit cargoArtifacts;
|
||||
cargoExtraArgs = "-p ${name}";
|
||||
});
|
||||
|
||||
noisebell-cache = buildMember "noisebell-cache";
|
||||
noisebell-discord = buildMember "noisebell-discord";
|
||||
noisebell-rss = buildMember "noisebell-rss";
|
||||
in
|
||||
{
|
||||
packages.${system} = {
|
||||
inherit noisebell-cache noisebell-discord noisebell-rss;
|
||||
default = noisebell-cache;
|
||||
};
|
||||
|
||||
nixosModules = {
|
||||
cache = import ./cache-service/module.nix noisebell-cache;
|
||||
discord = import ./discord-bot/module.nix noisebell-discord;
|
||||
rss = import ./rss-service/module.nix noisebell-rss;
|
||||
default = { imports = [
|
||||
(import ./cache-service/module.nix noisebell-cache)
|
||||
(import ./discord-bot/module.nix noisebell-discord)
|
||||
(import ./rss-service/module.nix noisebell-rss)
|
||||
]; };
|
||||
};
|
||||
|
||||
devShells.${system}.default = craneLib.devShell {
|
||||
packages = [ pkgs.rust-analyzer ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue