aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-16 16:34:38 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-16 16:35:55 +0200
commit069df761e01a3473ceccf9fb20d2aeb25c814a27 (patch)
tree923f1e0facf52a3ff97d087c5788bcb59f7a63ad /modules/by-name
parentflake: Remove `ragenix` input (diff)
downloadnixos-config-069df761e01a3473ceccf9fb20d2aeb25c814a27.zip
flake: Remove the `shell_library` input and its dependencies
All the remaining uses of the `sysLib` have been migrated to `pkgs.writeShellApplication`.
Diffstat (limited to 'modules/by-name')
-rw-r--r--modules/by-name/un/unison/module.nix3
-rw-r--r--modules/by-name/un/unison/shellScript.nix29
-rw-r--r--modules/by-name/ya/yambar/module.nix10
-rw-r--r--modules/by-name/zs/zsh/module.nix4
4 files changed, 16 insertions, 30 deletions
diff --git a/modules/by-name/un/unison/module.nix b/modules/by-name/un/unison/module.nix
index ef1a4cc1..8d156b00 100644
--- a/modules/by-name/un/unison/module.nix
+++ b/modules/by-name/un/unison/module.nix
@@ -11,12 +11,11 @@
lib,
config,
pkgs,
- sysLib,
...
}: let
cfg = config.soispha.services.unison;
- script = import ./shellScript.nix {inherit sysLib lib pkgs cfg;};
+ script = import ./shellScript.nix {inherit lib pkgs cfg;};
in {
options.soispha.services.unison = let
homePath = lib.types.strMatching "^~.*";
diff --git a/modules/by-name/un/unison/shellScript.nix b/modules/by-name/un/unison/shellScript.nix
index a6916a52..df373805 100644
--- a/modules/by-name/un/unison/shellScript.nix
+++ b/modules/by-name/un/unison/shellScript.nix
@@ -8,7 +8,6 @@
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
- sysLib,
lib,
pkgs,
cfg,
@@ -69,7 +68,7 @@
lib.strings.concatStringsSep " " [
"unison"
"${serialiseArgs cfg.unisonOptions}"
- "$EXTRA_OPTIONS"
+ "\"$@\""
"${getIgnored cfg.pathsToIgnore path}"
"${esa path}"
(esa "ssh://${cfg.foreign.userName}@${cfg.foreign.address}/${path}")
@@ -77,24 +76,18 @@
script = lib.strings.concatStringsSep "\n" (builtins.map mkScriptLine cfg.pathsToSync);
in
- sysLib.writeShellScript {
+ pkgs.writeShellApplication {
name = "unison-sync";
- src = builtins.toFile "unison-backup" (''
- #!/usr/bin/env dash
+ text = script;
- # shellcheck source=/dev/null
- SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-
- export UNISON=${esa cfg.dataDir};
-
- EXTRA_OPTIONS="$UNISON_EXTRA_OPTIONS $*"
- ''
- + script);
+ runtimeEnv = {
+ UNISON = cfg.dataDir;
+ };
- dependencies = with pkgs; [
- unison
- openssh # needed to connect to the other server
- less # needed to show diffs
- diffutils # needed to compute diffs
+ runtimeInputs = [
+ pkgs.unison
+ pkgs.openssh # needed to connect to the other server
+ pkgs.less # needed to show diffs
+ pkgs.diffutils # needed to compute diffs
];
}
diff --git a/modules/by-name/ya/yambar/module.nix b/modules/by-name/ya/yambar/module.nix
index 5a7b2efc..40edf978 100644
--- a/modules/by-name/ya/yambar/module.nix
+++ b/modules/by-name/ya/yambar/module.nix
@@ -9,7 +9,6 @@
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
config,
- sysLib,
pkgs,
lib,
...
@@ -21,12 +20,11 @@
dependencies,
...
}:
- sysLib.writeShellScript {
+ lib.getExe (pkgs.writeShellApplication {
inherit name;
- src = ./scripts/${name}.sh;
- dependencies = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;});
- }
- + "/bin/${name}";
+ text = builtins.readFile ./scripts/${name}.sh;
+ runtimeInputs = dependencies ++ (builtins.attrValues {inherit (pkgs) dash;});
+ });
mkWrapper = bin: cmd:
pkgs.writeShellScript cmd ''
diff --git a/modules/by-name/zs/zsh/module.nix b/modules/by-name/zs/zsh/module.nix
index fdd9edaf..6c3adb2b 100644
--- a/modules/by-name/zs/zsh/module.nix
+++ b/modules/by-name/zs/zsh/module.nix
@@ -10,7 +10,6 @@
{
config,
lib,
- shell_library,
system,
pkgs,
...
@@ -124,9 +123,6 @@ in {
+ sourceFile ./config/keymaps/viopp.zsh
+ sourceFile ./config/keymaps/visual.zsh
+ sourceFile ./config/keymaps_end.zsh
- + ''
- SHELL_LIBRARY_VERSION="2.1.2" source ${shell_library.rawLib.${system}}
- ''
);
in
lib.modules.mkMerge