0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-05-21 12:28:43 +00:00 committed by GitHub
commit 929b12e7b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 409 additions and 445 deletions

View file

@ -1,4 +1,4 @@
#! @shell@ -e
#! @runtimeShell@ -e
# skip this if there are no modems at all
if ! stat -t "@spoolAreaPath@"/etc/config.* >/dev/null 2>&1

View file

@ -3,7 +3,7 @@
let
inherit (lib.options) literalExample mkEnableOption mkOption;
inherit (lib.types) bool enum int lines attrsOf nullOr path str submodule;
inherit (lib.types) bool enum ints lines attrsOf nullOr path str submodule;
inherit (lib.modules) mkDefault mkIf mkMerge;
commonDescr = ''
@ -18,7 +18,6 @@ let
'';
str1 = lib.types.addCheck str (s: s!=""); # non-empty string
int1 = lib.types.addCheck int (i: i>0); # positive integer
configAttrType =
# Options in HylaFAX configuration files can be
@ -27,7 +26,7 @@ let
# This type definition resolves all
# those types into a list of strings.
let
inherit (lib.types) attrsOf coercedTo listOf;
inherit (lib.types) attrsOf coercedTo int listOf;
innerType = coercedTo bool (x: if x then "Yes" else "No")
(coercedTo int (toString) str);
in
@ -290,7 +289,7 @@ in
'';
};
faxcron.infoDays = mkOption {
type = int1;
type = ints.positive;
default = 30;
description = ''
Set the expiration time for data in the
@ -298,7 +297,7 @@ in
'';
};
faxcron.logDays = mkOption {
type = int1;
type = ints.positive;
default = 30;
description = ''
Set the expiration time for
@ -306,7 +305,7 @@ in
'';
};
faxcron.rcvDays = mkOption {
type = int1;
type = ints.positive;
default = 7;
description = ''
Set the expiration time for files in
@ -343,7 +342,7 @@ in
'';
};
faxqclean.doneqMinutes = mkOption {
type = int1;
type = ints.positive;
default = 15;
example = literalExample "24*60";
description = ''
@ -353,7 +352,7 @@ in
'';
};
faxqclean.docqMinutes = mkOption {
type = int1;
type = ints.positive;
default = 60;
example = literalExample "24*60";
description = ''

View file

@ -1,4 +1,4 @@
#! @shell@ -e
#! @runtimeShell@ -e
# The following lines create/update the HylaFAX spool directory:
# Subdirectories/files with persistent data are kept,
@ -80,7 +80,7 @@ touch clientlog faxcron.lastrun xferfaxlog
chown @faxuser@:@faxgroup@ clientlog faxcron.lastrun xferfaxlog
# create symlinks for frozen directories/files
lnsym --target-directory=. "@hylafax@"/spool/{COPYRIGHT,bin,config}
lnsym --target-directory=. "@hylafaxplus@"/spool/{COPYRIGHT,bin,config}
# create empty temporary directories
update --mode=0700 -d client dev status
@ -93,7 +93,7 @@ install -d "@spoolAreaPath@/etc"
cd "@spoolAreaPath@/etc"
# create symlinks to all files in template's etc
lnsym --target-directory=. "@hylafax@/spool/etc"/*
lnsym --target-directory=. "@hylafaxplus@/spool/etc"/*
# set LOCKDIR in setup.cache
sed --regexp-extended 's|^(UUCP_LOCKDIR=).*$|\1'"'@lockPath@'|g" --in-place setup.cache

View file

@ -13,11 +13,10 @@ let
# creates hylafax config file,
# makes sure "Include" is listed *first*
let
mkLines = conf:
(lib.concatLists
(lib.flip lib.mapAttrsToList conf
(k: map (v: "${k}: ${v}")
)));
mkLines = lib.flip lib.pipe [
(lib.mapAttrsToList (key: map (val: "${key}: ${val}")))
lib.concatLists
];
include = mkLines { Include = conf.Include or []; };
other = mkLines ( conf // { Include = []; } );
in
@ -48,13 +47,12 @@ let
name = "hylafax-setup-spool.sh";
src = ./spool.sh;
isExecutable = true;
inherit (pkgs.stdenv) shell;
hylafax = pkgs.hylafaxplus;
faxuser = "uucp";
faxgroup = "uucp";
lockPath = "/var/lock";
inherit globalConfigPath modemConfigPath;
inherit (cfg) sendmailPath spoolAreaPath userAccessFile;
inherit (pkgs) hylafaxplus runtimeShell;
};
waitFaxqScript = pkgs.substituteAll {
@ -64,8 +62,8 @@ let
src = ./faxq-wait.sh;
isExecutable = true;
timeoutSec = toString 10;
inherit (pkgs.stdenv) shell;
inherit (cfg) spoolAreaPath;
inherit (pkgs) runtimeShell;
};
sockets.hylafax-hfaxd = {
@ -108,8 +106,10 @@ let
PrivateDevices = true; # breaks /dev/tty...
PrivateNetwork = true;
PrivateTmp = true;
#ProtectClock = true; # breaks /dev/tty... (why?)
ProtectControlGroups = true;
#ProtectHome = true; # breaks custom spool dirs
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
#ProtectSystem = "strict"; # breaks custom spool dirs