···104 };
105 };
106107- config = {
0000000000000108 system.nixos-generate-config.configuration = mkDefault ''
109 # Edit this configuration file to define what should be installed on
110 # your system. Help is available in the configuration.nix(5) man page
···104 };
105 };
106107+ options.system.disableInstallerTools = mkOption {
108+ internal = true;
109+ type = types.bool;
110+ default = false;
111+ description = ''
112+ Disable nixos-rebuild, nixos-generate-config, nixos-installer
113+ and other NixOS tools. This is useful to shrink embedded,
114+ read-only systems which are not expected to be rebuild or
115+ reconfigure themselves. Use at your own risk!
116+ '';
117+ };
118+119+ config = lib.mkIf (!config.system.disableInstallerTools) {
120+121 system.nixos-generate-config.configuration = mkDefault ''
122 # Edit this configuration file to define what should be installed on
123 # your system. Help is available in the configuration.nix(5) man page
···18 });
1920 systemActivationScript = set: onlyDry: let
21- set' = filterAttrs (_: v: onlyDry -> v.supportsDryActivation) (mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set);
22 withHeadlines = addAttributeName set';
00000000023 in
24 ''
25 #!${pkgs.runtimeShell}
···37 # Ensure a consistent umask.
38 umask 0022
3940- ${textClosureMap id (withHeadlines) (attrNames withHeadlines)}
4142 '' + optionalString (!onlyDry) ''
43 # Make this configuration the current configuration.
···18 });
1920 systemActivationScript = set: onlyDry: let
21+ set' = mapAttrs (_: v: if isString v then (noDepEntry v) // { supportsDryActivation = false; } else v) set;
22 withHeadlines = addAttributeName set';
23+ # When building a dry activation script, this replaces all activation scripts
24+ # that do not support dry mode with a comment that does nothing. Filtering these
25+ # activation scripts out so they don't get generated into the dry activation script
26+ # does not work because when an activation script that supports dry mode depends on
27+ # an activation script that does not, the dependency cannot be resolved and the eval
28+ # fails.
29+ withDrySnippets = mapAttrs (a: v: if onlyDry && !v.supportsDryActivation then v // {
30+ text = "#### Activation script snippet ${a} does not support dry activation.";
31+ } else v) withHeadlines;
32 in
33 ''
34 #!${pkgs.runtimeShell}
···46 # Ensure a consistent umask.
47 umask 0022
4849+ ${textClosureMap id (withDrySnippets) (attrNames withDrySnippets)}
5051 '' + optionalString (!onlyDry) ''
52 # Make this configuration the current configuration.
···25 else "");
26in stdenv.mkDerivation rec {
27 pname = "signal-desktop";
28- version = "5.17.0"; # Please backport all updates to the stable channel.
29 # All releases have a limited lifetime and "expire" 90 days after the release.
30 # When releases "expire" the application becomes unusable until an update is
31 # applied. The expiration date for the current release can be extracted with:
···3536 src = fetchurl {
37 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
38- sha256 = "1m3bkrshlipxlbf4xr7gpw3zn1k39cdysrqmw705hy2cwf7pw7yy";
39 };
4041 nativeBuildInputs = [
···25 else "");
26in stdenv.mkDerivation rec {
27 pname = "signal-desktop";
28+ version = "5.17.1"; # Please backport all updates to the stable channel.
29 # All releases have a limited lifetime and "expire" 90 days after the release.
30 # When releases "expire" the application becomes unusable until an update is
31 # applied. The expiration date for the current release can be extracted with:
···3536 src = fetchurl {
37 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
38+ sha256 = "sha256-gJ5jDMdEx2YSmPtNfv2gKKAgPfRJcb3Aabti/DgHaIU=";
39 };
4041 nativeBuildInputs = [
···1-diff --git a/internal/buf/cmd/buf/workspace_test.go b/internal/buf/cmd/buf/workspace_test.go
2-index e051690..8887837 100644
3---- a/internal/buf/cmd/buf/workspace_test.go
4-+++ b/internal/buf/cmd/buf/workspace_test.go
5-@@ -335,6 +335,9 @@ func TestWorkspaceNestedArchive(t *testing.T) {
6 }
78 func TestWorkspaceGit(t *testing.T) {
9+ // Requires .git directory which we do not retain due to
10+ // `leaveDotGit` non-determinism
11+ t.Skip()
012 // Directory paths specified as a git reference within a workspace.
13 t.Parallel()
14- testRunStdout(
···1+diff --git a/private/buf/cmd/buf/workspace_test.go b/private/buf/cmd/buf/workspace_test.go
2+index 25e33dd..f593beb 100644
3+--- a/private/buf/cmd/buf/workspace_test.go
4++++ b/private/buf/cmd/buf/workspace_test.go
5+@@ -340,6 +340,9 @@ func TestWorkspaceNestedArchive(t *testing.T) {
6 }
78 func TestWorkspaceGit(t *testing.T) {
9+ // Requires .git directory which we do not retain due to
10+ // `leaveDotGit` non-determinism
11+ t.Skip()
12+ t.Skip("skip until the move to private/buf is merged")
13 // Directory paths specified as a git reference within a workspace.
14 t.Parallel()
0