first commit
This commit is contained in:
commit
12d8d4cd8e
3 changed files with 326 additions and 0 deletions
59
flake.nix
Normal file
59
flake.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
description = "mail-quota-warning package and service";
|
||||
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-25.11";
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
systems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
# Import nixpkgs with our overlay for each system.
|
||||
nixpkgsFor = forAllSystems (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlay ];
|
||||
}
|
||||
);
|
||||
in {
|
||||
overlay = final: prev: {
|
||||
mail-quota-warning = with final; python3Packages.buildPythonApplication {
|
||||
pname = "mail-quota-warning";
|
||||
version = "0.0.1";
|
||||
format = "other";
|
||||
|
||||
src = self;
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
python
|
||||
pyyaml
|
||||
imaplib2
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 ${./mail-quota-warning.py} $out/bin/mail-quota-warning
|
||||
'';
|
||||
|
||||
meta.mainProgram = "mail-quota-warning";
|
||||
};
|
||||
};
|
||||
|
||||
packages = forAllSystems (system: {
|
||||
inherit (nixpkgsFor.${system}) mail-quota-warning;
|
||||
});
|
||||
|
||||
defaultPackage = forAllSystems (system: self.packages.${system}.mail-quota-warning);
|
||||
|
||||
devShells = forAllSystems (system: let
|
||||
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
|
||||
in pkgs.mkShell {
|
||||
buildInputs = with pkgs; with python3Packages; [
|
||||
python
|
||||
requests
|
||||
beautifulsoup4
|
||||
];
|
||||
});
|
||||
|
||||
# mail-quota-warning service module
|
||||
nixosModule = (import ./module.nix);
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue