add nixos module
This commit is contained in:
parent
1d01583913
commit
fa82bf579a
2 changed files with 55 additions and 0 deletions
|
|
@ -95,5 +95,7 @@
|
|||
packages = { inherit start; };
|
||||
defaultPackage.x86_64-linux = start;
|
||||
|
||||
nixosModule = (import ./module.nix);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
53
module.nix
Normal file
53
module.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
||||
cfg = config.services.verwaltungstracker;
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
services.verwaltungstracker = {
|
||||
|
||||
enable = lib.mkEnableOption "Verwaltungstracker web app";
|
||||
|
||||
} // options.services.froide-govplan.settings;
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
froide-govplan = super.froide-govplan.overridePythonAttrs (oldAttrs: {
|
||||
src = pkgs.fetchFromGitea {
|
||||
domain = "git.project-insanity.org";
|
||||
owner = "onny";
|
||||
repo = "verwaltungstracker";
|
||||
rev = "e5acfdf19d5af71bc5223c72713c128f3948f39f";
|
||||
hash = "sha256-SRxPKherMz9xv/1XZjmwYg74r7Qln+vfLWgHyG5RbxQ=";
|
||||
};
|
||||
dependencies = oldAttrs.dependencies ++ [ oldAttrs.passthru.python.pkgs.mastodon-py ];
|
||||
passthru = oldAttrs.passthru // {
|
||||
pythonPath = "${pkgs.python3.pkgs.makePythonPath [pkgs.python3.pkgs.mastodon-py]}:${oldAttrs.passthru.pythonPath}";
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
services.froide-govplan = {
|
||||
enable = true;
|
||||
settings = cfg.settings;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
meta = {
|
||||
maintainers = with lib.maintainers; [ onny ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue