Modules: Tweak fever dream merging for autostart attribute
This commit is contained in:
parent
20212e406c
commit
84885450a2
|
@ -32,8 +32,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
aux.system.users.media.enable = true;
|
||||
users.users.airsonic.extraGroups = [ "media" ];
|
||||
|
||||
|
@ -63,10 +62,7 @@ in
|
|||
};
|
||||
|
||||
systemd.services.nginx.wants = [ config.systemd.services.airsonic.name ];
|
||||
})
|
||||
(lib.mkIf (!cfg.autostart) {
|
||||
# Disable autostart if needed
|
||||
systemd.services.airsonic.wantedBy = lib.mkForce [ ];
|
||||
})
|
||||
];
|
||||
# Disable autostart if configured
|
||||
systemd.services.airsonic = lib.mkIf (!cfg.autostart) { wantedBy = lib.mkForce [ ]; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -28,15 +28,14 @@ rec {
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = [ duplicacy-web ];
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 3875 ];
|
||||
|
||||
# Install systemd service.
|
||||
systemd.services."duplicacy-web" = {
|
||||
systemd.services.duplicacy-web = {
|
||||
enable = true;
|
||||
wants = [ "network-online.target" ];
|
||||
after = [
|
||||
|
@ -54,13 +53,6 @@ rec {
|
|||
environment = {
|
||||
HOME = cfg.environment;
|
||||
};
|
||||
} // lib.optionalAttrs (!cfg.autostart) { wantedBy = lib.mkForce [ ]; };
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf (!cfg.autostart) {
|
||||
# Disable autostart if needed
|
||||
systemd.services.duplicacy-web.wantedBy = lib.mkForce [ ];
|
||||
})
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
@ -55,8 +55,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
forgejo-cli
|
||||
pkgs.podman-tui
|
||||
|
@ -126,10 +125,7 @@ in
|
|||
allowedTCPPorts = [ 53 ];
|
||||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
})
|
||||
(lib.mkIf (!cfg.autostart) {
|
||||
# Disable autostart if needed
|
||||
systemd.services.forgejo.wantedBy = lib.mkForce [ ];
|
||||
})
|
||||
];
|
||||
# Disable autostart if configured
|
||||
systemd.services.forgejo = lib.mkIf (!cfg.autostart) { wantedBy = lib.mkForce [ ]; };
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,8 +17,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
|
@ -38,10 +37,8 @@ in
|
|||
443
|
||||
];
|
||||
};
|
||||
})
|
||||
(lib.mkIf (!cfg.autostart) {
|
||||
# Disable autostart if needed
|
||||
systemd.services.nginx.wantedBy = lib.mkForce [ ];
|
||||
})
|
||||
];
|
||||
|
||||
# Disable autostart if configured
|
||||
systemd.services.nginx = lib.mkIf (!cfg.autostart) { wantedBy = lib.mkForce [ ]; };
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue