nix-gitea-themes/flake.nix

53 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2024-04-09 00:39:34 +02:00
{
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;
2024-04-09 01:19:01 +02:00
gitea-theme-monokai = pkgs.callPackage ./themes/monokai { };
2024-04-09 00:39:34 +02:00
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;
}
2024-04-09 01:19:01 +02:00
({pkgs, ... }: {
2024-04-09 00:39:34 +02:00
services.gitea.enable = true;
2024-04-09 01:19:01 +02:00
services.gitea-themes."monokai" = pkgs.gitea-theme-monokai;
})
2024-04-09 00:39:34 +02:00
];
}).config.system.build.toplevel;
});
overlays.default = final: prev: {
inherit (self.packages.${final.system}) gitea-theme-monokai;
};
nixosModules.default = ./module.nix;
};
}