forked from Zynh0722/permafrost
nyazoom: module init
This commit is contained in:
parent
90209f1de9
commit
f970f53e74
2 changed files with 24 additions and 0 deletions
|
@ -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
22
modules/nyazoom.nix
Normal 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" ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue