nix-gitea-themes/flake.nix

53 lines
1.3 KiB
Nix

{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in f system pkgs);
in {
packages = forAllSystems (system: pkgs: {
default = self.packages.${system}.gitea-theme-monokai;
gitea-theme-monokai = pkgs.callPackage ./themes/monokai { };
test-machine = let
system = "x86_64-linux";
in (nixpkgs.lib.nixosSystem {
inherit system;
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
modules = [
self.nixosModules.default
{
system.stateVersion = "23.11";
boot.isContainer = true;
}
({pkgs, ... }: {
services.gitea.enable = true;
services.gitea-themes."monokai" = pkgs.gitea-theme-monokai;
})
];
}).config.system.build.toplevel;
});
overlays.default = final: prev: {
inherit (self.packages.${final.system}) gitea-theme-monokai;
};
nixosModules.default = ./module.nix;
};
}