Skip to content

Commit

Permalink
Testing assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Feb 27, 2024
1 parent 13b2133 commit 237696d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nixarr/jellyfin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
lib,
...
}:
with lib; let
let
cfg = config.nixarr.jellyfin;
defaultPort = 8096;
nixarr = config.nixarr;
dnsServers = config.lib.vpn.dnsServers;
in {
in with lib; {
options.nixarr.jellyfin = {
enable = mkEnableOption "the Jellyfin service.";

Expand Down Expand Up @@ -106,10 +106,17 @@ in {

config =
# TODO: this doesn't work. I don't know why :(
#assert (!(cfg.vpn.enable && cfg.expose.enable)) || abort "vpn.enable not compatible with expose.enable.";
assert (!(cfg.vpn.enable && cfg.expose.https.enable)) || abort "vpn.enable not compatible with expose.enable.";
#assert (cfg.expose.enable -> (cfg.expose.domainName != null && cfg.expose.acmeMail != null)) || abort "Both expose.domain and expose.acmeMail needs to be set if expose.enable is set.";
mkIf cfg.enable
{
assertions = [
{
assertion = !(cfg.vpn.enable && cfg.expose.https.enable);
message = "The vpn.enable option conflicts with the expose.enable option";
}
];

systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' 0700 streamer root - -"
];
Expand Down

0 comments on commit 237696d

Please sign in to comment.