initial commit

This commit is contained in:
Gabriel Fontes
2022-01-27 22:57:11 -03:00
commit c8c2b86ea6
16 changed files with 3720 additions and 0 deletions

49
flake.nix Normal file
View File

@@ -0,0 +1,49 @@
{
description = "Discord bot for interacting with subsonic music libraries";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
let
name = "disconic";
overlay = final: prev: {
${name} = final.callPackage ./default.nix { };
};
overlays = [ overlay ];
in
rec {
inherit overlay overlays;
nixosModules."${name}" = import ./module.nix;
nixosModule = nixosModules."${name}";
} //
(utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs { inherit system overlays; });
in
rec {
# nix build
packages.${name} = pkgs.${name};
defaultPackage = packages.${name};
# nix run
apps.${name} = utils.lib.mkApp { drv = packages.${name}; };
defaultApp = apps.${name};
# nix develop
devShell = pkgs.mkShell {
inputsFrom = [ defaultPackage ];
buildInputs = with pkgs;
[
clippy
rust-analyzer
rustc
rustfmt
];
};
}
));
}