Loading nixos/modules/services/network-filesystems/diod.nix +17 −22 Original line number Diff line number Diff line Loading @@ -9,20 +9,6 @@ let diodBool = b: if b then "1" else "0"; diodConfig = pkgs.writeText "diod.conf" '' allsquash = ${diodBool cfg.allsquash} auth_required = ${diodBool cfg.authRequired} exportall = ${diodBool cfg.exportall} exportopts = "${lib.concatStringsSep "," cfg.exportopts}" exports = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.exports)} } listen = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.listen)} } logdest = "${cfg.logdest}" nwthreads = ${toString cfg.nwthreads} squashuser = "${cfg.squashuser}" statfs_passthru = ${diodBool cfg.statfsPassthru} userdb = ${diodBool cfg.userdb} ${cfg.extraConfig} ''; in { options = { Loading Loading @@ -150,13 +136,22 @@ in config = lib.mkIf config.services.diod.enable { environment.systemPackages = [ pkgs.diod ]; systemd.services.diod = { description = "diod 9P file server"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; serviceConfig = { ExecStart = "${pkgs.diod}/sbin/diod -f -c ${diodConfig}"; }; }; environment.etc."diod.conf".text = '' allsquash = ${diodBool cfg.allsquash} auth_required = ${diodBool cfg.authRequired} exportall = ${diodBool cfg.exportall} exportopts = "${lib.concatStringsSep "," cfg.exportopts}" exports = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.exports)} } listen = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.listen)} } logdest = "${cfg.logdest}" nwthreads = ${toString cfg.nwthreads} squashuser = "${cfg.squashuser}" statfs_passthru = ${diodBool cfg.statfsPassthru} userdb = ${diodBool cfg.userdb} ${cfg.extraConfig} ''; systemd.packages = [ pkgs.diod ]; systemd.services.diod.wantedBy = [ "multi-user.target" ]; }; } pkgs/servers/diod/default.nix +20 −7 Original line number Diff line number Diff line { lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkg-config, munge, lua, libcap, Loading @@ -11,18 +13,24 @@ stdenv.mkDerivation rec { pname = "diod"; version = "1.0.24"; version = "1.1.0"; src = fetchurl { url = "https://github.com/chaos/diod/releases/download/${version}/${pname}-${version}.tar.gz"; sha256 = "17wckwfsqj61yixz53nwkc35z66arb1x3napahpi64m7q68jn7gl"; src = fetchFromGitHub { owner = "chaos"; repo = "diod"; tag = "v${version}"; hash = "sha256-Fz+qvgw5ipyAcZlWBGkmSHuGrZ95i5OorLN3dkdsYKU="; }; postPatch = '' substituteInPlace diod/xattr.c --replace attr/xattr.h sys/xattr.h sed -i -e '/sys\/types\.h>/a #include <sys/sysmacros.h>' diod/ops.c sed -i configure.ac -e '/git describe/c ${version})' ''; nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ munge lua Loading @@ -31,6 +39,11 @@ stdenv.mkDerivation rec { ncurses ]; configureFlags = [ "--with-systemdsystemunitdir=$(out)/lib/systemd/system/" "--sysconfdir=/etc" ]; meta = { description = "I/O forwarding server that implements a variant of the 9P protocol"; maintainers = with lib.maintainers; [ rnhmjoj ]; Loading Loading
nixos/modules/services/network-filesystems/diod.nix +17 −22 Original line number Diff line number Diff line Loading @@ -9,20 +9,6 @@ let diodBool = b: if b then "1" else "0"; diodConfig = pkgs.writeText "diod.conf" '' allsquash = ${diodBool cfg.allsquash} auth_required = ${diodBool cfg.authRequired} exportall = ${diodBool cfg.exportall} exportopts = "${lib.concatStringsSep "," cfg.exportopts}" exports = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.exports)} } listen = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.listen)} } logdest = "${cfg.logdest}" nwthreads = ${toString cfg.nwthreads} squashuser = "${cfg.squashuser}" statfs_passthru = ${diodBool cfg.statfsPassthru} userdb = ${diodBool cfg.userdb} ${cfg.extraConfig} ''; in { options = { Loading Loading @@ -150,13 +136,22 @@ in config = lib.mkIf config.services.diod.enable { environment.systemPackages = [ pkgs.diod ]; systemd.services.diod = { description = "diod 9P file server"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; serviceConfig = { ExecStart = "${pkgs.diod}/sbin/diod -f -c ${diodConfig}"; }; }; environment.etc."diod.conf".text = '' allsquash = ${diodBool cfg.allsquash} auth_required = ${diodBool cfg.authRequired} exportall = ${diodBool cfg.exportall} exportopts = "${lib.concatStringsSep "," cfg.exportopts}" exports = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.exports)} } listen = { ${lib.concatStringsSep ", " (map (s: ''"${s}"'') cfg.listen)} } logdest = "${cfg.logdest}" nwthreads = ${toString cfg.nwthreads} squashuser = "${cfg.squashuser}" statfs_passthru = ${diodBool cfg.statfsPassthru} userdb = ${diodBool cfg.userdb} ${cfg.extraConfig} ''; systemd.packages = [ pkgs.diod ]; systemd.services.diod.wantedBy = [ "multi-user.target" ]; }; }
pkgs/servers/diod/default.nix +20 −7 Original line number Diff line number Diff line { lib, stdenv, fetchurl, fetchFromGitHub, autoreconfHook, pkg-config, munge, lua, libcap, Loading @@ -11,18 +13,24 @@ stdenv.mkDerivation rec { pname = "diod"; version = "1.0.24"; version = "1.1.0"; src = fetchurl { url = "https://github.com/chaos/diod/releases/download/${version}/${pname}-${version}.tar.gz"; sha256 = "17wckwfsqj61yixz53nwkc35z66arb1x3napahpi64m7q68jn7gl"; src = fetchFromGitHub { owner = "chaos"; repo = "diod"; tag = "v${version}"; hash = "sha256-Fz+qvgw5ipyAcZlWBGkmSHuGrZ95i5OorLN3dkdsYKU="; }; postPatch = '' substituteInPlace diod/xattr.c --replace attr/xattr.h sys/xattr.h sed -i -e '/sys\/types\.h>/a #include <sys/sysmacros.h>' diod/ops.c sed -i configure.ac -e '/git describe/c ${version})' ''; nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ munge lua Loading @@ -31,6 +39,11 @@ stdenv.mkDerivation rec { ncurses ]; configureFlags = [ "--with-systemdsystemunitdir=$(out)/lib/systemd/system/" "--sysconfdir=/etc" ]; meta = { description = "I/O forwarding server that implements a variant of the 9P protocol"; maintainers = with lib.maintainers; [ rnhmjoj ]; Loading