diff --git a/configuration.nix b/configuration.nix index 949a019..0280790 100644 --- a/configuration.nix +++ b/configuration.nix @@ -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. diff --git a/modules/nyazoom.nix b/modules/nyazoom.nix new file mode 100644 index 0000000..d842151 --- /dev/null +++ b/modules/nyazoom.nix @@ -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" ]; + }; + + }; +}