about summary refs log tree commit diff stats
path: root/modules/home.legacy
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/home.legacy/conf/default.nix1
-rw-r--r--modules/home.legacy/conf/firefox/config/bookmarks/default.nix22
-rw-r--r--modules/home.legacy/conf/firefox/config/search/engines/default.nix6
-rw-r--r--modules/home.legacy/conf/mail/default.nix32
-rw-r--r--modules/home.legacy/conf/mbsync/default.nix17
-rw-r--r--modules/home.legacy/conf/mpv/default.nix10
-rw-r--r--modules/home.legacy/pkgs/default.nix69
7 files changed, 71 insertions, 86 deletions
diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix
index 848bcccf..e1cab572 100644
--- a/modules/home.legacy/conf/default.nix
+++ b/modules/home.legacy/conf/default.nix
@@ -16,7 +16,6 @@
     ./mail
     ./mako
     ./mbsync
-    ./mpv
     ./mumble
     ./neomutt
     ./nix-index
diff --git a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix b/modules/home.legacy/conf/firefox/config/bookmarks/default.nix
index c612bf4d..41936819 100644
--- a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix
+++ b/modules/home.legacy/conf/firefox/config/bookmarks/default.nix
@@ -3,27 +3,7 @@
   pkgs,
   ...
 }: let
-  bookmarks = [
-    {
-      name = "Feed - Piped";
-      url = "https://piped.video/feed";
-    }
-
-    {
-      name = "DeepL Translate";
-      url = "https://www.deepl.com/translator";
-    }
-
-    {
-      name = "Nix lib";
-      url = "https://teu5us.github.io/nix-lib.html";
-    }
-
-    {
-      name = "Nixpkgs manual";
-      url = "https://ryantm.github.io/nixpkgs/";
-    }
-  ];
+  bookmarks = [];
 
   mkBookmarksFile = (import ./lib.nix) {inherit lib pkgs;};
   bookmarks_file = mkBookmarksFile bookmarks;
diff --git a/modules/home.legacy/conf/firefox/config/search/engines/default.nix b/modules/home.legacy/conf/firefox/config/search/engines/default.nix
index a47c77df..7e7880ca 100644
--- a/modules/home.legacy/conf/firefox/config/search/engines/default.nix
+++ b/modules/home.legacy/conf/firefox/config/search/engines/default.nix
@@ -13,6 +13,12 @@
     definedAliases = ["@np"];
   };
 
+  "Nix functions" = {
+    urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
+    icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+    definedAliases = ["@ng"];
+  };
+
   "NixOS Options" = {
     urls = [{template = "https://search.nixos.org/options?type=options&query={searchTerms}";}];
     icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
diff --git a/modules/home.legacy/conf/mail/default.nix b/modules/home.legacy/conf/mail/default.nix
index 0ecbe40a..9c2554ee 100644
--- a/modules/home.legacy/conf/mail/default.nix
+++ b/modules/home.legacy/conf/mail/default.nix
@@ -1,15 +1,47 @@
 {
   config,
   pkgs,
+  lib,
   ...
 }: let
   benedikt = import ./accounts/benedikt.nix {inherit pkgs;};
   soispha = import ./accounts/soispha.nix {inherit pkgs;};
 
   accounts = {inherit soispha benedikt;};
+
+  mkHelper = {
+    userName,
+    passwordCommand,
+    ...
+  }:
+    builtins.toString (pkgs.writeShellScript "git-credential-keepassxc-libsecret"
+      # bash
+      ''
+        [ "$1" = "get" ] || {
+          exit 1
+        }
+        if cat | grep "username=${userName}" -q; then
+          ${passwordCommand}
+        else
+          # Not our business.
+          exit 1
+        fi
+      '');
+  accountCredentials =
+    # TODO: This will result in only one of them being defined, as we duplicate the
+    # attribute key<2025-02-03>
+    lib.mapAttrs' (_: value: {
+      name = "credential.smtp://${value.smtp.host}:${builtins.toString value.smtp.port}";
+      value = {
+        "helper" = mkHelper value;
+      };
+    })
+    accounts;
 in {
   accounts.email = {
     maildirBasePath = "${config.xdg.dataHome}/maildir";
     inherit accounts;
   };
+
+  programs.git.extraConfig = accountCredentials;
 }
diff --git a/modules/home.legacy/conf/mbsync/default.nix b/modules/home.legacy/conf/mbsync/default.nix
index ac9808c9..8418d92d 100644
--- a/modules/home.legacy/conf/mbsync/default.nix
+++ b/modules/home.legacy/conf/mbsync/default.nix
@@ -1,17 +1,16 @@
-{
-  config,
-  lib,
-  ...
-}: {
-  # TODO: I have no clue if both are needed, but it looks neat, right?
+{lib, ...}: {
+  # This configures the program in itself (i.e., sets-up a config file, etc.)
   programs.mbsync = {
     enable = true;
   };
+
+  # This starts a systemd service to periodically sync mail
   services.mbsync = {
     enable = true;
-    # TODO: enable after isync 1.5 drops
-    #configFile = "${config.xdg.configHome}/mbsync/mbsync.conf";
   };
-  # Disable the timer, and only activate it on neomutt start
+
+  # Disable the timer, and only activate the service when neomutt starts
+  # Otherwise, the password command would prompt me to unlock the keepassxc database every
+  # time.
   systemd.user.timers.mbsync = lib.mkForce {};
 }
diff --git a/modules/home.legacy/conf/mpv/default.nix b/modules/home.legacy/conf/mpv/default.nix
deleted file mode 100644
index 6b252a38..00000000
--- a/modules/home.legacy/conf/mpv/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{...}: {
-  programs.mpv = {
-    enable = true;
-    bindings = {
-      q = "quit 0";
-      "Ctrl+c" = "quit 1";
-      "Shift+q" = "quit-watch-later 1";
-    };
-  };
-}
diff --git a/modules/home.legacy/pkgs/default.nix b/modules/home.legacy/pkgs/default.nix
index 1a4c4a1b..1d77c7de 100644
--- a/modules/home.legacy/pkgs/default.nix
+++ b/modules/home.legacy/pkgs/default.nix
@@ -5,44 +5,37 @@
   nixosConfig,
   ...
 }:
-# TODO: Remove this whole file, and move each pkgs to a separate module. <2024-11-16>
+# 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 = [
-      # foot # wayland native terminal
       alacritty # default terminal
     ];
-    Browsers = [
-      #ungoogled-chromium # web browser (only for web programming)
-      #brave
-    ];
-
-    ImageManipulation = [
-      #krita # new, and better (KDE)
-      #gimp # conservative, and old (GNOME)
-    ];
 
     Social = [
-      mumble # voice chat software (client)
-      # lutris # multiple game store clients
-
-      # nheko # best matrix client (as of today)
-      # element-desktop  # nheko didn't work
       signal-desktop # to avoid encryption problems with signal-bridge
     ];
 
     Misc = [
-      #kalzium # Periodic Table of Elements (`element` is [sort of] better)
       keepassxc # password manager
-      #onlykey # OnlyKey Chrome Desktop App
       anki-bin # spaced repetition
     ];
   };
 
   TuiCli = {
     EyeCandy = [
-      #banner # Print large banners to ASCII terminals
-      cmatrix # A curses-based scrolling 'Matrix'-like screen
       hyfetch # Neofetch with LGBTQ pride flags.
     ];
 
@@ -58,7 +51,6 @@ with pkgs; let
       android-file-transfer # Android MTP client with minimalistic UI
       #xdg-ninja # A shell script which checks your $HOME for unwanted files and directories.
       xdg-utils # open urls and such things
-      yokadi # Command line oriented, sqlite powered, todo list
       killall # kill a application by name
       snap-sync-forked # A btrfs based backup solution
       bc # Smart calculator
@@ -77,33 +69,18 @@ with pkgs; let
       Firefox = [
         # `neorg` handles the integration between Firefox profiles and task
         # contexts
-        (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;
-          })
+        neorgFinal
       ];
     };
 
     WM = {
-      river = [river]; # A dynamic tiling wayland compositor
-
       CLITools = [
         lswt # List Wayland toplevels.
         wl-clipboard # Command-line copy/paste utilities.
-        swaylock # My current lockscreen implementation.
       ];
 
       Media = [
-        wf-recorder # Screen recorder.
         libnotify # a command to send a notification.
-        screenshot_persistent # Creates a persisting screenshot.
-        screenshot_temporary # Takes a screenshot and stores it in the clipboard.
       ];
     };
 
@@ -120,13 +97,11 @@ with pkgs; let
 
       Listen = [
         spodi # Wrapper around `spotdl`.
-        sort_song # Sorts songs in the current directory.
       ];
     };
 
     Hardware = {
       Storage = [
-        #compsize # Calculate compression ratio of a set of files on Btrfs
         # TODO: smartmontools # Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives
       ];
 
@@ -144,10 +119,6 @@ with pkgs; let
             backlightName = nixosConfig.soispha.laptop.backlight;
           }
         );
-
-      Input = [
-        #piper # GTK application to configure gaming mice
-      ];
     };
 
     SystemUpdate = [
@@ -176,7 +147,6 @@ with pkgs; let
       GeneralTools = [
         stamp # Add a license header to a file
         git # the fast distributed version control system
-        git-absorb # git commit --fixup, but automatic
         git-edit-index # Allows you to edit the indexed version of a file
         git-cm # A wrapper that re-adds the last commit's subject
         git-cleanup # An automatic merged branch deleter
@@ -194,7 +164,16 @@ with pkgs; let
       else builtins.attrValues x
     else [x];
 in {
-  home.packages =
+  options.soispha.programs.neorg = {
+    package = lib.mkOption {
+      type = lib.types.package;
+      default = neorgFinal;
+      description = ''
+        The neorg package to use.
+      '';
+    };
+  };
+  config.home.packages =
     []
     ++ (with builtins;
       concatLists