diff options
author | Lassulus <github@lassul.us> | 2022-12-01 22:37:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 22:37:53 +0100 |
commit | aca927667acea7bb01dc8e72ee71f6548d9fd41b (patch) | |
tree | 2d372d2a79b3663e8653e0fc16fd436c75a12758 /module.nix | |
parent | 4c1b8a4e596fa5b9e23ad78170c95512ab71bd74 (diff) | |
parent | 25cc022282590f36ed2c3cb542774053d58dddc8 (diff) |
Merge pull request #65 from nix-community/no-deps
Diffstat (limited to 'module.nix')
-rw-r--r-- | module.nix | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -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} @@ -52,7 +34,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} ''; |