mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-30 21:15:21 +03:00
Merge master into staging-next
This commit is contained in:
commit
d4464ff8fe
92 changed files with 2133 additions and 1403 deletions
|
@ -464,6 +464,21 @@ EOF
|
|||
}
|
||||
}
|
||||
|
||||
# For lack of a better way to determine it, guess whether we should use a
|
||||
# bigger font for the console from the display mode on the first
|
||||
# framebuffer. A way based on the physical size/actual DPI reported by
|
||||
# the monitor would be nice, but I don't know how to do this without X :)
|
||||
my $fb_modes_file = "/sys/class/graphics/fb0/modes";
|
||||
if (-f $fb_modes_file && -r $fb_modes_file) {
|
||||
my $modes = read_file($fb_modes_file);
|
||||
$modes =~ m/([0-9]+)x([0-9]+)/;
|
||||
my $console_width = $1, my $console_height = $2;
|
||||
if ($console_width > 1920) {
|
||||
push @attrs, "# High-DPI console";
|
||||
push @attrs, 'i18n.consoleFont = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Generate the hardware configuration file.
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ let
|
|||
${optionalString (cfg.class != null) "class = ${cfg.class}"}
|
||||
memory = ${cfg.memory}
|
||||
storage_memory = ${cfg.storageMemory}
|
||||
trace_format = ${cfg.traceFormat}
|
||||
|
||||
${optionalString (cfg.tls != null) ''
|
||||
tls_plugin = ${pkg}/libexec/plugins/FDBLibTLS.so
|
||||
|
@ -317,6 +318,12 @@ in
|
|||
default = "/run/foundationdb.pid";
|
||||
description = "Path to pidfile for fdbmonitor.";
|
||||
};
|
||||
|
||||
traceFormat = mkOption {
|
||||
type = types.enum [ "xml" "json" ];
|
||||
default = "xml";
|
||||
description = "Trace logging format.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -382,7 +389,7 @@ in
|
|||
chown -R ${cfg.user}:${cfg.group} ${cfg.pidfile}
|
||||
|
||||
for x in "${cfg.logDir}" "${cfg.dataDir}"; do
|
||||
[ ! -d "$x" ] && mkdir -m 0700 -vp "$x";
|
||||
[ ! -d "$x" ] && mkdir -m 0770 -vp "$x";
|
||||
chown -R ${cfg.user}:${cfg.group} "$x";
|
||||
done
|
||||
|
||||
|
@ -404,7 +411,7 @@ in
|
|||
|
||||
postStart = ''
|
||||
if [ -e "${cfg.dataDir}/.first_startup" ]; then
|
||||
fdbcli --exec "configure new single memory"
|
||||
fdbcli --exec "configure new single ssd"
|
||||
rm -f "${cfg.dataDir}/.first_startup";
|
||||
fi
|
||||
'';
|
||||
|
|
|
@ -153,7 +153,6 @@ in
|
|||
({
|
||||
description = "Tinc Daemon - ${network}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
path = [ data.package ];
|
||||
restartTriggers = [ config.environment.etc."tinc/${network}/tinc.conf".source ];
|
||||
serviceConfig = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue