nyazoom: module init

This commit is contained in:
Zynh Ludwig 2024-12-27 01:46:11 -08:00
parent 90209f1de9
commit f970f53e74
2 changed files with 24 additions and 0 deletions

View file

@ -11,6 +11,8 @@
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
permafrost.nyazoom.enable = true;
networking.hostName = "virtmsi"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

22
modules/nyazoom.nix Normal file
View file

@ -0,0 +1,22 @@
{ lib, config, inputs, pkgs, ... }:
let
nyazoom = inputs.nyazoom.packages.${pkgs.system}.default;
cfg = config.permafrost.nyazoom;
in
{
options.permafrost.nyazoom = {
enable = lib.mkEnableOption "permafrost nixos module";
};
config = lib.mkIf cfg.enable {
systemd.user.services.nyazoom = {
script = ''
DATABASE_URL="sqlite:///var/lib/nyazoom/data" ${lib.getExe nyazoom}
'';
wants = [ "network.target" ];
};
};
}