From 6c3e0d22e465541b35772ba4a00331f587bc28c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 29 Nov 2022 10:53:56 +0100 Subject: remove dependency on bash --- module.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'module.nix') diff --git a/module.nix b/module.nix index 0655880..47c52dd 100644 --- a/module.nix +++ b/module.nix @@ -52,7 +52,8 @@ in { ''; # This is useful to skip copying executables uploading a script to an in-memory installer - system.build.diskoNoDeps = pkgs.writers.writeBash "disko" '' + system.build.diskoNoDeps = pkgs.writeScript "disko" '' + #!/usr/bin/env bash ${types.diskoLib.zapCreateMount cfg.devices} ''; -- cgit v1.2.3 From 67f991e2bcf38d7c2a99f1cdbbdb4fbc60b8e8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 29 Nov 2022 14:58:31 +0100 Subject: drop environment.systemPackages Those packages are only used for installation and are not used afterwards. system.build outputs can be used to get them in an installer included. --- module.nix | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'module.nix') diff --git a/module.nix b/module.nix index 47c52dd..9b568be 100644 --- a/module.nix +++ b/module.nix @@ -16,26 +16,8 @@ in { type = lib.types.bool; default = true; }; - addScripts = lib.mkOption { - description = '' - add disko-create and disko-mount scripts to systemPackages. - ''; - type = lib.types.bool; - default = true; - }; }; config = { - environment.systemPackages = (lib.optionals cfg.addScripts [ - (pkgs.writers.writeDashBin "disko-create" '' - export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)} - ${types.diskoLib.create cfg.devices} - '') - (pkgs.writers.writeDashBin "disko-mount" '' - export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)} - ${types.diskoLib.mount cfg.devices} - '') - ]) ++ lib.optionals cfg.enableConfig (types.diskoLib.packages cfg.devices pkgs); - system.build.formatScript = pkgs.writers.writeDash "disko-create" '' export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)} ${types.diskoLib.create cfg.devices} -- cgit v1.2.3