aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 13:12:12 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-04 13:12:12 +0200
commit8c4e702a269317609fb1f6609045e7e99e611f65 (patch)
tree1ae0b49611a05a24d7a5be7b707eee565a5c38b7 /modules
parentrefactor(modules/timewarrior): Migrate to by-name (diff)
downloadnixos-config-8c4e702a269317609fb1f6609045e7e99e611f65.zip
refactor(treewide): neorg -> tskm
Diffstat (limited to 'modules')
-rw-r--r--modules/by-name/ts/tskm/module.nix2
-rwxr-xr-xmodules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh4
-rw-r--r--modules/home.legacy/conf/xdg/default.nix30
-rwxr-xr-xmodules/home.legacy/conf/xdg/url_handler.sh10
-rw-r--r--modules/home.legacy/pkgs/default.nix26
5 files changed, 23 insertions, 49 deletions
diff --git a/modules/by-name/ts/tskm/module.nix b/modules/by-name/ts/tskm/module.nix
index fa61bf7a..75af4509 100644
--- a/modules/by-name/ts/tskm/module.nix
+++ b/modules/by-name/ts/tskm/module.nix
@@ -103,7 +103,7 @@ in {
config.lib.taskwarrior.mkHook "on-add" [
pkgs.jq
pkgs.gnugrep
- pkgs.neorg
+ pkgs.tskm
]
./taskwarrior_hooks/enforce-projects.sh;
};
diff --git a/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh b/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh
index d65f786a..217e6052 100755
--- a/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh
+++ b/modules/by-name/ts/tskm/taskwarrior_hooks/enforce-projects.sh
@@ -5,8 +5,8 @@ new_task="$1"
project="$(echo "$new_task" | jq '.project' --raw-output)"
[ "$project" = "null" ] && die "No project supplied!"
-if ! neorg list | grep -q "^$project$"; then
- die "The project '$project' is not (yet) registered, registered projects: $(neorg list | tr '\n' ',')"
+if ! tskm projects list | grep -q "^$project$"; then
+ die "The project '$project' is not (yet) registered, registered projects: $(tskm projects list | tr '\n' ',')"
fi
# vim: ft=sh
diff --git a/modules/home.legacy/conf/xdg/default.nix b/modules/home.legacy/conf/xdg/default.nix
index 4099720d..9751d806 100644
--- a/modules/home.legacy/conf/xdg/default.nix
+++ b/modules/home.legacy/conf/xdg/default.nix
@@ -1,22 +1,18 @@
{
- sysLib,
pkgs,
- config,
+ lib,
...
}: let
- url_handler = sysLib.writeShellScript {
- name = "url_handler";
- src = ./url_handler.sh;
- keepPath = true;
- # Naming dependencies for this will be difficult, as it depend on overridden packages.
- dependencies = with pkgs; [
- rofi
- libnotify
- zathura
+ url_handler = pkgs.writeShellApplication {
+ name = "url-handler";
+ text = builtins.readFile ./url_handler.sh;
+ inheritPath = false;
+ runtimeInputs = [
+ pkgs.rofi
+ pkgs.libnotify
+ pkgs.zathura
+ pkgs.tskm
];
- replacementStrings = {
- ALL_PROJECTS_PIPE = "${config.soispha.taskwarrior.projects.projects_pipe}";
- };
};
in {
imports = [
@@ -39,10 +35,10 @@ in {
};
};
desktopEntries = {
- url_handler = {
- name = "url_handler";
+ url-handler = {
+ name = "url-handler";
genericName = "Web Browser";
- exec = "${url_handler}/bin/url_handler %u";
+ exec = "${lib.getExe url_handler} %u";
terminal = false;
categories = [
"Application"
diff --git a/modules/home.legacy/conf/xdg/url_handler.sh b/modules/home.legacy/conf/xdg/url_handler.sh
index 95eedffb..f15df384 100755
--- a/modules/home.legacy/conf/xdg/url_handler.sh
+++ b/modules/home.legacy/conf/xdg/url_handler.sh
@@ -1,9 +1,9 @@
-#!/usr/bin/env dash
+#!/usr/bin/env sh
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-
-project="$(echo "%ALL_PROJECTS_PIPE|nvim|zathura|" | rofi -sep "|" -dmenu)"
+project="$({
+ tskm projects list
+ echo nvim zathura
+} | rofi -sep "$(printf "\n")" -dmenu)"
if [ "$project" = "nvim" ]; then
"$TERMINAL" -e nvim "$1"
diff --git a/modules/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix
index 859aea36..e9181b99 100644
--- a/modules/home.legacy/pkgs/default.nix
+++ b/modules/home.legacy/pkgs/default.nix
@@ -1,24 +1,11 @@
{
pkgs,
lib,
- config,
nixosConfig,
...
}:
# TODO: Remove this whole file, and move each package to a separate module. <2024-11-16>
with pkgs; let
- neorgFinal =
- neorg.override
- {
- defaultNeorgProjectDir = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces.projects;
- allProjectsNewline = config.soispha.taskwarrior.projects.projects_newline;
- allProjectsComma = config.soispha.taskwarrior.projects.projects_comma;
- allProjectsPipe = config.soispha.taskwarrior.projects.projects_pipe;
- allWorkspaces = config.programs.nixvim.plugins.neorg.settings.load."core.dirman".config.workspaces;
- xdgConfigHome = config.xdg.configHome;
- xdgDataHome = config.xdg.dataHome;
- };
-
Gui = {
Terminals = [
alacritty # default terminal
@@ -65,9 +52,9 @@ with pkgs; let
];
Firefox = [
- # `neorg` handles the integration between Firefox profiles and task
+ # `tskm` handles the integration between Firefox profiles and task
# contexts
- neorgFinal
+ pkgs.tskm
];
};
@@ -158,15 +145,6 @@ with pkgs; let
else builtins.attrValues x
else [x];
in {
- options.soispha.programs.neorg = {
- package = lib.mkOption {
- type = lib.types.package;
- default = neorgFinal;
- description = ''
- The neorg package to use.
- '';
- };
- };
config.home.packages =
[]
++ (with builtins;