aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name')
-rw-r--r--modules/by-name/at/atuin/module.nix17
-rw-r--r--modules/by-name/fi/fish/module.nix8
-rw-r--r--modules/by-name/lf/lf/module.nix14
-rw-r--r--modules/by-name/lf/lf/wrappers/default.nix4
-rw-r--r--[-rwxr-xr-x]modules/by-name/lf/lf/wrappers/ll.fish (renamed from modules/by-name/lf/lf/wrappers/lm/lm.sh)25
-rwxr-xr-xmodules/by-name/lf/lf/wrappers/ll/ll.sh23
-rw-r--r--modules/by-name/lf/lf/wrappers/lm.fish (renamed from modules/by-name/lf/lf/wrappers/ll/default.nix)18
-rw-r--r--modules/by-name/lf/lf/wrappers/lm/default.nix18
8 files changed, 40 insertions, 87 deletions
diff --git a/modules/by-name/at/atuin/module.nix b/modules/by-name/at/atuin/module.nix
index 81a97c26..d68e830c 100644
--- a/modules/by-name/at/atuin/module.nix
+++ b/modules/by-name/at/atuin/module.nix
@@ -42,19 +42,16 @@ in {
soispha.services.unison.pathsToIgnore = [
# Already synchronized by atuin sync server
"~/.local/share/atuin"
+ "~/.local/share/turtle"
];
home-manager.users.soispha = {
- programs.atuin = {
- enable = true;
-
- package = externalBinaries.turtle.packages.${system}.default;
+ imports = [
+ externalBinaries.turtle.nixosModules.home-manager
+ ];
- daemon.enable = true;
-
- # We can (and have to) do this on our own.
- enableZshIntegration = false;
- enableFishIntegration = false;
+ programs.turtle = {
+ enable = true;
settings = {
sync = lib.mkIf cfg.enableAge {
@@ -67,7 +64,7 @@ in {
logs = {
enabled = true;
- dir = "${config.home-manager.users.soispha.xdg.cacheHome}/atuin/logs";
+ dir = "${config.home-manager.users.soispha.xdg.cacheHome}/turtle/logs";
};
# Use the rather reasonable syntax of `skim` to search.
diff --git a/modules/by-name/fi/fish/module.nix b/modules/by-name/fi/fish/module.nix
index d3ec97df..590df8b9 100644
--- a/modules/by-name/fi/fish/module.nix
+++ b/modules/by-name/fi/fish/module.nix
@@ -10,6 +10,7 @@
{
config,
lib,
+ pkgs,
...
}: let
cfg = config.soispha.programs.fish;
@@ -41,7 +42,10 @@ in {
config = lib.mkIf cfg.enable {
# Ensure that the default shell of the user is actually enabled.
- programs.fish.enable = true;
+ programs.fish = {
+ enable = true;
+ package = pkgs.fish-patched;
+ };
home-manager.users.soispha = {
home.sessionPath = lib.mkForce [];
@@ -49,6 +53,8 @@ in {
programs.fish = {
enable = true;
+ package = config.programs.fish.package;
+
interactiveShellInit = let
start = lib.modules.mkBefore (
sourceFile ./config/01_show-task.fish
diff --git a/modules/by-name/lf/lf/module.nix b/modules/by-name/lf/lf/module.nix
index c47599bd..11708152 100644
--- a/modules/by-name/lf/lf/module.nix
+++ b/modules/by-name/lf/lf/module.nix
@@ -44,8 +44,6 @@
attrs;
keybindings = builtins.listToAttrs (lib.lists.flatten (process null keybindings_raw));
- packages = import ./wrappers {inherit pkgs;};
-
cfg = config.soispha.programs.lf;
in {
imports = [
@@ -83,11 +81,11 @@ in {
# fish
''
function ll
- . ${lib.getExe packages.ll}
+ . ${./wrappers/ll.fish} $argv
end
function lm
- . ${lib.getExe packages.lm}
+ . ${./wrappers/lm.fish} $argv
end
'';
@@ -97,10 +95,10 @@ in {
"lf/colors".source = ./colors;
};
- programs.zsh.shellAliases = {
- ll = ". ${lib.getExe packages.ll}";
- lm = ". ${lib.getExe packages.lm}";
- };
+ # programs.zsh.shellAliases = {
+ # ll = ". ${lib.getExe packages.ll}";
+ # lm = ". ${lib.getExe packages.lm}";
+ # };
programs.lf = {
enable = true;
diff --git a/modules/by-name/lf/lf/wrappers/default.nix b/modules/by-name/lf/lf/wrappers/default.nix
deleted file mode 100644
index 7257a66e..00000000
--- a/modules/by-name/lf/lf/wrappers/default.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{pkgs}: {
- ll = pkgs.callPackage ./ll {};
- lm = pkgs.callPackage ./lm {};
-}
diff --git a/modules/by-name/lf/lf/wrappers/lm/lm.sh b/modules/by-name/lf/lf/wrappers/ll.fish
index 71213721..7a146993 100755..100644
--- a/modules/by-name/lf/lf/wrappers/lm/lm.sh
+++ b/modules/by-name/lf/lf/wrappers/ll.fish
@@ -1,4 +1,4 @@
-#!/usr/bin/env dash
+#!/usr/bin/env fish
# nixos-config - My current NixOS configuration
#
@@ -10,19 +10,14 @@
# 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>.
-die() {
- echo "ERROR: $1"
- exit 1
-}
+begin
+ test -d "$XDG_RUNTIME_DIR/ll"; or mkdir "$XDG_RUNTIME_DIR/ll"
+ set last_directory "$XDG_RUNTIME_DIR/ll/last_directory"
-msg() {
- echo "$1"
-}
+ command lf -last-dir-path="$last_directory" "$argv"
-if [ -f "$XDG_RUNTIME_DIR/ll/last_directory" ]; then
- last_dir="$(cat "$XDG_RUNTIME_DIR/ll/last_directory")"
- cd "$last_dir" || die "$last_dir does not exist!"
-else
- msg "No last directory saved (try using ll instead)."
-fi
-# vim: ft=sh
+ set dir "$(cat "$last_directory")"
+ if not cd "$dir"
+ echo "ll: Failed to cd to '$dir'. Does it exist?"
+ end
+end
diff --git a/modules/by-name/lf/lf/wrappers/ll/ll.sh b/modules/by-name/lf/lf/wrappers/ll/ll.sh
deleted file mode 100755
index 9bb314c6..00000000
--- a/modules/by-name/lf/lf/wrappers/ll/ll.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env dash
-
-# nixos-config - My current NixOS configuration
-#
-# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-# This file is part of my nixos-config.
-#
-# 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>.
-
-[ -d "$XDG_RUNTIME_DIR/ll" ] || mkdir "$XDG_RUNTIME_DIR/ll"
-last_directory="$XDG_RUNTIME_DIR/ll/last_directory"
-
-command lf -last-dir-path="$last_directory" "$@"
-
-dir="$(cat "$last_directory")"
-if ! cd "$dir"; then
- die "ll: Failed to cd to '$dir'. Does it exist?"
-fi
-
-# vim: ft=sh
diff --git a/modules/by-name/lf/lf/wrappers/ll/default.nix b/modules/by-name/lf/lf/wrappers/lm.fish
index 6e4ee336..b590c143 100644
--- a/modules/by-name/lf/lf/wrappers/ll/default.nix
+++ b/modules/by-name/lf/lf/wrappers/lm.fish
@@ -1,3 +1,5 @@
+#!/usr/bin/env fish
+
# nixos-config - My current NixOS configuration
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
@@ -7,12 +9,12 @@
#
# 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>.
-{writeShellApplication}:
-writeShellApplication {
- name = "ll";
- text = builtins.readFile ./ll.sh;
- # This is sourced in the shell
- inheritPath = true;
- bashOptions = [];
-}
+begin
+ if test -f "$XDG_RUNTIME_DIR/ll/last_directory"
+ set last_dir "$(cat "$XDG_RUNTIME_DIR/ll/last_directory")"
+ cd "$last_dir"; or echo "$last_dir does not exist!"
+ else
+ echo "No last directory saved (try using ll instead)."
+ end
+end
diff --git a/modules/by-name/lf/lf/wrappers/lm/default.nix b/modules/by-name/lf/lf/wrappers/lm/default.nix
deleted file mode 100644
index 42bdc687..00000000
--- a/modules/by-name/lf/lf/wrappers/lm/default.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-# nixos-config - My current NixOS configuration
-#
-# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
-# SPDX-License-Identifier: GPL-3.0-or-later
-#
-# This file is part of my nixos-config.
-#
-# 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>.
-{writeShellApplication}:
-writeShellApplication {
- name = "lm";
- text = builtins.readFile ./lm.sh;
-
- # This is sourced in the shell
- inheritPath = true;
- bashOptions = [];
-}