feat: add option to enable Samba/CIFS features for Nextcloud (#153)
same as #152 but minus the formatting from nixfmt Co-authored-by: cl0vrfi3ld <47996003+cl0vrfi3ld@users.noreply.github.com> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config/pulls/153 Reviewed-by: Inex Code <inex.code@selfprivacy.org> Co-authored-by: Clover <cl0vrfi3ld@noreply.git.selfprivacy.org> Co-committed-by: Clover <cl0vrfi3ld@noreply.git.selfprivacy.org>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
.DS_Store
|
||||||
userdata/userdata.json
|
userdata/userdata.json
|
||||||
userdata/tokens.json
|
userdata/tokens.json
|
||||||
hardware-configuration.nix
|
hardware-configuration.nix
|
||||||
|
@@ -88,6 +88,16 @@ in
|
|||||||
weight = 2;
|
weight = 2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
enableSambaFeatures = (lib.mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Enable support for Samba/CIFS features";
|
||||||
|
}) // {
|
||||||
|
meta = {
|
||||||
|
type = "bool";
|
||||||
|
weight = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
debug = (lib.mkOption {
|
debug = (lib.mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
@@ -247,6 +257,13 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
# enables samba features when requested
|
||||||
|
(lib.mkIf cfg.enableSambaFeatures {
|
||||||
|
# only apply cifs-utils package to this module
|
||||||
|
services.phpfpm.pools.nextcloud.phpEnv.PATH =
|
||||||
|
lib.mkForce "${pkgs.samba}/bin:${pkgs.cifs-utils}/bin:/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin";
|
||||||
|
systemd.services.nextcloud-cron.path = [ pkgs.samba pkgs.cifs-utils ];
|
||||||
|
})
|
||||||
# the following part is active only when "auth" module is enabled
|
# the following part is active only when "auth" module is enabled
|
||||||
(lib.mkIf is-auth-enabled {
|
(lib.mkIf is-auth-enabled {
|
||||||
systemd.services.nextcloud-setup = {
|
systemd.services.nextcloud-setup = {
|
||||||
|
Reference in New Issue
Block a user