added flake.nix

This commit is contained in:
Snorre Ettrup Altschul 2025-04-03 00:00:31 +02:00
parent 763ab0d28b
commit b9298c19b1
2 changed files with 51 additions and 0 deletions

23
flake.lock Normal file
View file

@ -0,0 +1,23 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 0,
"narHash": "sha256-CCS+jIsmI3o0bfQMoC45/6bJ56Dp/M8D94heC29//wI=",
"path": "/nix/store/7jpd4vn7wihcxr446azvqfw073j7nmx3-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

28
flake.nix Normal file
View file

@ -0,0 +1,28 @@
{
description = "Declarative jellyfin with more options";
inputs = {};
outputs = {
self,
nixpkgs,
...
}: let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"x86_64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
in {
formatter = forAllSystems (
system: let
pkgs = import nixpkgs {inherit system;};
in
pkgs.alejandra
);
nixosModules = rec {
declarative-jellyfin = import ./module.nix;
default = declarative-jellyfin;
};
nixosModule = self.nixosModules.default; # compatiblilty
};
}