Files
nixarr/flake.nix
T
2024-03-14 15:21:27 +01:00

91 lines
2.0 KiB
Nix

{
description = "The Nixarr Nixos Module for Hosting the \"*Arrs\"";
nixConfig = {
extra-substituters = ["https://nix-community.cachix.org"];
extra-trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
vpnconfinement = {
url = "github:Maroka-chan/VPN-Confinement";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
flake-root.url = "github:srid/flake-root";
devshell = {
url = "github:numtide/devshell";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
flake-parts,
vpnconfinement,
...
}:
flake-parts.lib.mkFlake {
inherit inputs;
} {
imports = with inputs; [
flake-root.flakeModule
treefmt-nix.flakeModule
devshell.flakeModule
];
systems = [
"x86_64-linux"
];
flake = {
nixosModules = rec {
nixarr = import ./nixarr vpnconfinement;
imports = [ vpnconfinement.nixosModules.default ];
default = nixarr;
};
};
perSystem = {
config,
pkgs,
...
}: {
treefmt.config = {
inherit (config.flake-root) projectRootFile;
package = pkgs.treefmt;
programs = {
alejandra.enable = true;
deadnix.enable = true;
};
};
packages = {
docs = pkgs.callPackage ./mkDocs.nix {inherit inputs;};
};
devshells.default = {
name = "Rasmus Kirk";
commands = [
{
category = "Tools";
name = "fmt";
help = "Format the source tree";
command = "nix fmt";
}
];
};
};
};
}