Skip to content

Commit

Permalink
Merge master into haskell-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Apr 13, 2023
2 parents 31d0bee + c05b69b commit cbbd635
Show file tree
Hide file tree
Showing 55 changed files with 531 additions and 377 deletions.
12 changes: 12 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3533,6 +3533,12 @@
fingerprint = "5B08 313C 6853 E5BF FA91 A817 0176 0B4F 9F53 F154";
}];
};
davisrichard437 = {
email = "[email protected]";
github = "davisrichard437";
githubId = 85075437;
name = "Richard Davis";
};
davorb = {
email = "[email protected]";
github = "davorb";
Expand Down Expand Up @@ -8415,6 +8421,12 @@
githubId = 2422454;
name = "Kai Wohlfahrt";
};
kylehendricks = {
name = "Kyle Hendricks";
email = "[email protected]";
github = "kylehendricks";
githubId = 981958;
};
kyleondy = {
email = "[email protected]";
github = "KyleOndy";
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/installer/tools/nixos-generate-config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ sub in {
}

# Don't emit tmpfs entry for /tmp, because it most likely comes from the
# boot.tmpOnTmpfs option in configuration.nix (managed declaratively).
# boot.tmp.useTmpfs option in configuration.nix (managed declaratively).
next if ($mountPoint eq "/tmp" && $fsType eq "tmpfs");

# Emit the filesystem.
Expand Down
8 changes: 1 addition & 7 deletions nixos/modules/services/cluster/kubernetes/kubelet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ in
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "cadvisorPort" ] "")
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "allowPrivileged" ] "")
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "networkPlugin" ] "")
(mkRemovedOptionModule [ "services" "kubernetes" "kubelet" "containerRuntime" ] "")
];

###### interface
Expand Down Expand Up @@ -134,12 +135,6 @@ in
};
};

containerRuntime = mkOption {
description = lib.mdDoc "Which container runtime type to use";
type = enum ["docker" "remote"];
default = "remote";
};

containerRuntimeEndpoint = mkOption {
description = lib.mdDoc "Endpoint at which to find the container runtime api interface/socket";
type = str;
Expand Down Expand Up @@ -331,7 +326,6 @@ in
${optionalString (cfg.tlsKeyFile != null)
"--tls-private-key-file=${cfg.tlsKeyFile}"} \
${optionalString (cfg.verbosity != null) "--v=${toString cfg.verbosity}"} \
--container-runtime=${cfg.containerRuntime} \
--container-runtime-endpoint=${cfg.containerRuntimeEndpoint} \
--cgroup-driver=systemd \
${cfg.extraOpts}
Expand Down
3 changes: 1 addition & 2 deletions nixos/modules/services/networking/go-neb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,12 @@ in {

serviceConfig = {
ExecStartPre = lib.optional (cfg.secretFile != null)
(pkgs.writeShellScript "pre-start" ''
("+" + pkgs.writeShellScript "pre-start" ''
umask 077
export $(xargs < ${cfg.secretFile})
${pkgs.envsubst}/bin/envsubst -i "${configFile}" > ${finalConfigFile}
chown go-neb ${finalConfigFile}
'');
PermissionsStartOnly = true;
RuntimeDirectory = "go-neb";
ExecStart = "${pkgs.go-neb}/bin/go-neb";
User = "go-neb";
Expand Down
7 changes: 7 additions & 0 deletions nixos/modules/services/web-apps/mastodon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,13 @@ in {
<option>services.mastodon.smtp.authenticate</option> is enabled.
'';
}
{
assertion = 1 == builtins.length
(lib.mapAttrsToList
(_: v: builtins.elem "scheduler" v.jobClasses || v.jobClasses == [ ])
cfg.sidekiqProcesses);
message = "There must be one and only one Sidekiq queue in services.mastodon.sidekiqProcesses with jobClass \"scheduler\".";
}
];

environment.systemPackages = [ mastodonTootctl ];
Expand Down
81 changes: 43 additions & 38 deletions nixos/modules/system/boot/tmp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,67 @@
with lib;

let
cfg = config.boot;
cfg = config.boot.tmp;
in
{

###### interface
imports = [
(mkRenamedOptionModule [ "boot" "cleanTmpDir" ] [ "boot" "tmp" "cleanOnBoot" ])
(mkRenamedOptionModule [ "boot" "tmpOnTmpfs" ] [ "boot" "tmp" "useTmpfs" ])
(mkRenamedOptionModule [ "boot" "tmpOnTmpfsSize" ] [ "boot" "tmp" "tmpfsSize" ])
];

options = {
boot.tmp = {
cleanOnBoot = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to delete all files in {file}`/tmp` during boot.
'';
};

boot.cleanTmpDir = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to delete all files in {file}`/tmp` during boot.
'';
};
tmpfsSize = mkOption {
type = types.oneOf [ types.str types.types.ints.positive ];
default = "50%";
description = lib.mdDoc ''
Size of tmpfs in percentage.
Percentage is defined by systemd.
'';
};

boot.tmpOnTmpfs = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to mount a tmpfs on {file}`/tmp` during boot.
'';
};
useTmpfs = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to mount a tmpfs on {file}`/tmp` during boot.
boot.tmpOnTmpfsSize = mkOption {
type = types.oneOf [ types.str types.types.ints.positive ];
default = "50%";
description = lib.mdDoc ''
Size of tmpfs in percentage.
Percentage is defined by systemd.
'';
::: {.note}
Large Nix builds can fail if the mounted tmpfs is not large enough.
In such a case either increase the tmpfsSize or disable this option.
:::
'';
};
};

};

###### implementation

config = {

# When changing remember to update /tmp mount in virtualisation/qemu-vm.nix
systemd.mounts = mkIf cfg.tmpOnTmpfs [
systemd.mounts = mkIf cfg.useTmpfs [
{
what = "tmpfs";
where = "/tmp";
type = "tmpfs";
mountConfig.Options = concatStringsSep "," [ "mode=1777"
"strictatime"
"rw"
"nosuid"
"nodev"
"size=${toString cfg.tmpOnTmpfsSize}" ];
mountConfig.Options = concatStringsSep "," [
"mode=1777"
"strictatime"
"rw"
"nosuid"
"nodev"
"size=${toString cfg.tmpfsSize}"
];
}
];

systemd.tmpfiles.rules = optional config.boot.cleanTmpDir "D! /tmp 1777 root root";

systemd.tmpfiles.rules = optional cfg.cleanOnBoot "D! /tmp 1777 root root";
};

}
4 changes: 2 additions & 2 deletions nixos/modules/virtualisation/qemu-vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1069,12 +1069,12 @@ in
fsType = "ext4";
autoFormat = true;
});
"/tmp" = lib.mkIf config.boot.tmpOnTmpfs {
"/tmp" = lib.mkIf config.boot.tmp.useTmpfs {
device = "tmpfs";
fsType = "tmpfs";
neededForBoot = true;
# Sync with systemd's tmp.mount;
options = [ "mode=1777" "strictatime" "nosuid" "nodev" "size=${toString config.boot.tmpOnTmpfsSize}" ];
options = [ "mode=1777" "strictatime" "nosuid" "nodev" "size=${toString config.boot.tmp.tmpfsSize}" ];
};
"/nix/${if cfg.writableStore then ".ro-store" else "store"}" = lib.mkIf cfg.useNixStoreImage {
device = "${lookupDriveDeviceName "nix-store" cfg.qemu.drives}";
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/ihatemoney/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let
http = ":8000";
};
};
boot.cleanTmpDir = true;
boot.tmp.cleanOnBoot = true;
# for exchange rates
security.pki.certificateFiles = [ ./server.crt ];
networking.extraHosts = "127.0.0.1 api.exchangerate.host";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ in

emacspeak = callPackage ./manual-packages/emacspeak { };

ement = callPackage ./manual-packages/ement { };

ess-R-object-popup = callPackage ./manual-packages/ess-R-object-popup { };

evil-markdown = callPackage ./manual-packages/evil-markdown { };
Expand Down

This file was deleted.

This file was deleted.

15 changes: 5 additions & 10 deletions pkgs/applications/graphics/gnome-decoder/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
, libadwaita
, zbar
, sqlite
, openssl
, pipewire
, gstreamer
, gst-plugins-base
Expand All @@ -22,20 +23,20 @@

clangStdenv.mkDerivation rec {
pname = "gnome-decoder";
version = "0.3.1";
version = "0.3.3";

src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "decoder";
rev = version;
hash = "sha256-WJIOaYSesvLmOzF1Q6o6aLr4KJanXVaNa+r+2LlpKHQ=";
hash = "sha256-eMyPN3UxptqavY9tEATW2AP+kpoWaLwUKCwhNQrarVc=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-RMHVrv/0q42qFUXyd5BSymzx+BxiyqTX0Jzmxnlhyr4=";
hash = "sha256-3j1hoFffQzWBy4IKtmoMkLBJmNbntpyn0sjv1K0MmDo=";
};

nativeBuildInputs = [
Expand All @@ -57,6 +58,7 @@ clangStdenv.mkDerivation rec {
libadwaita
zbar
sqlite
openssl
pipewire
gstreamer
gst-plugins-base
Expand All @@ -65,19 +67,12 @@ clangStdenv.mkDerivation rec {

LIBCLANG_PATH = "${libclang.lib}/lib";

# FIXME: workaround for Pipewire 0.3.64 deprecated API change, remove when fixed upstream
# https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/issues/55
preBuild = ''
export BINDGEN_EXTRA_CLANG_ARGS="$BINDGEN_EXTRA_CLANG_ARGS -DPW_ENABLE_DEPRECATED"
'';

meta = with lib; {
description = "Scan and Generate QR Codes";
homepage = "https://gitlab.gnome.org/World/decoder";
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "decoder";
maintainers = with maintainers; [ zendo ];
broken = true;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From a4822ee9e894f5f5b3110f41f65a698dd845a41d Mon Sep 17 00:00:00 2001
From: Richard Davis <[email protected]>
Date: Fri, 24 Mar 2023 11:45:23 -0400
Subject: [PATCH] Changing paths to be nix-compatible.

---
dist/desktop/gscreenshot.desktop | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dist/desktop/gscreenshot.desktop b/dist/desktop/gscreenshot.desktop
index a5d2bcd..9d289e2 100644
--- a/dist/desktop/gscreenshot.desktop
+++ b/dist/desktop/gscreenshot.desktop
@@ -2,7 +2,7 @@
Type=Application
Name=gscreenshot
Comment=A simple screenshot utility
-TryExec=/usr/bin/gscreenshot
+TryExec=gscreenshot
Exec=gscreenshot
Icon=gscreenshot
Categories=Graphics;
--
2.39.2

Loading

0 comments on commit cbbd635

Please sign in to comment.