diff --git a/SwarselSystems.org b/SwarselSystems.org index 67399e8..cf6371f 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -4031,9 +4031,6 @@ in github-nixpkgs-review-token = { owner = mainUser; }; }) // (lib.optionalAttrs modules.emacs { emacs-radicale-pw = { owner = mainUser; }; - }) // (lib.optionalAttrs modules.anki { - anki-user = { owner = mainUser; }; - anki-pw = { owner = mainUser; }; }); templates = { authinfo = lib.mkIf modules.emacs { @@ -11206,7 +11203,7 @@ This holds packages that I can use as provided, or with small modifications (as # specifically needed for anki # mpv - # anki-bin + anki-bin # dirvish file previews fd @@ -13420,7 +13417,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi ***** obsidian service for tray #+begin_src nix-ts :tangle modules/home/common/obsidian-tray.nix - { lib, config, ... }: + { lib, config, pkgs, ... }: { options.swarselmodules.obsidian-tray = lib.mkEnableOption "enable obsidian applet for tray"; config = lib.mkIf config.swarselmodules.obsidian-tray { @@ -13441,7 +13438,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi }; Service = { - ExecStart = "${lib.getExe config.programs.obsidian.package}"; + ExecStart = "${pkgs.obsidian}/bin/obsidian"; }; }; }; @@ -13452,40 +13449,36 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi ***** anki service for tray #+begin_src nix-ts :tangle modules/home/common/anki-tray.nix - { lib, config, ... }: - { - options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray"; - config = lib.mkIf config.swarselmodules.anki-tray { + { lib, config, pkgs, ... }: + { + options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray"; + config = lib.mkIf config.swarselmodules.anki-tray { - systemd.user.services.anki-applet = { - Unit = { - Description = "Anki applet"; - Requires = [ "tray.target" ]; - After = [ - "graphical-session.target" - "tray.target" - ]; - PartOf = [ "graphical-session.target" ]; - }; + systemd.user.services.anki-applet = { + Unit = { + Description = "Anki applet"; + Requires = [ "tray.target" ]; + After = [ + "graphical-session.target" + "tray.target" + ]; + PartOf = [ "graphical-session.target" ]; + }; - Install = { - WantedBy = [ "graphical-session.target" ]; - }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; - Service = { - # ExecStart = "${lib.getExe config.programs.anki.package}"; - ExecStart = "/etc/profiles/per-user/swarsel/bin/anki"; - Environment = [ - "QT_QPA_PLATFORM=xcb" - ]; - }; - }; + Service = { + ExecStart = "${pkgs.anki-bin}/bin/anki-bin"; + }; + }; - }; - } + }; + } #+end_src -***** element service for tray +***** element service for tr #+begin_src nix-ts :tangle modules/home/common/element-tray.nix { lib, config, pkgs, ... }: @@ -14435,7 +14428,6 @@ This service changes the screen hue at night. I am not sure if that really does in { enable = true; - package = pkgs.obsidian; defaultSettings = { app = { attachmentFolderPath = "attachments"; @@ -14555,76 +14547,6 @@ This service changes the screen hue at night. I am not sure if that really does } #+end_src -**** Anki - - -#+begin_src nix-ts :tangle modules/home/common/anki.nix - { lib, config, pkgs, globals, nixosConfig ? config, ... }: - let - moduleName = "anki"; - inherit (config.swarselsystems) isPublic isNixos; - in - { - options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} and settings"; - config = lib.mkIf config.swarselmodules.${moduleName} { - - sops = lib.mkIf (!isPublic && !isNixos) { - secrets = { - anki-user = { }; - anki-pw = { }; - }; - }; - - programs.anki = { - enable = true; - package = pkgs.anki; - hideBottomBar = true; - hideBottomBarMode = "always"; - hideTopBar = true; - hideTopBarMode = "always"; - reduceMotion = true; - spacebarRatesCard = true; - # videoDriver = "opengl"; - sync = { - autoSync = true; - syncMedia = true; - url = "https://${globals.services.ankisync.domain}"; - usernameFile = nixosConfig.sops.secrets.anki-user.path; - # this is not the password but the syncKey - # get it by logging in or out, saving preferences and then - # show details on the "settings wont be saved" dialog - keyFile = nixosConfig.sops.secrets.anki-pw.path; - }; - addons = - let - minimize-to-tray = pkgs.anki-utils.buildAnkiAddon - (finalAttrs: { - pname = "minimize-to-tray"; - version = "2.0.1"; - src = pkgs.fetchFromGitHub { - owner = "simgunz"; - repo = "anki21-addons_minimize-to-tray"; - rev = finalAttrs.version; - sparseCheckout = [ "src" ]; - hash = "sha256-xmvbIOfi9K0yEUtUNKtuvv2Vmqrkaa4Jie6J1s+FuqY="; - }; - sourceRoot = "${finalAttrs.src.name}/src"; - }); - in - [ - (minimize-to-tray.withConfig - { - config = { - hide_on_startup = "true"; - }; - }) - ]; - }; - }; - - } -#+end_src - *** Server :PROPERTIES: :CUSTOM_ID: h:b1a00339-6e9b-4ae4-b5dc-6fd5669a2ddb @@ -18097,7 +18019,6 @@ This holds modules that are to be used on most hosts. These are also the most im anki-tray = lib.mkDefault true; element-tray = lib.mkDefault true; vesktop-tray = lib.mkDefault true; - anki = lib.mkDefault true; }; }; diff --git a/index.html b/index.html index 82e30e2..11c1d62 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-This file has 94619 words spanning 24340 lines and was last revised on 2025-10-09 02:38:15 +0200. +This file has 94403 words spanning 24261 lines and was last revised on 2025-10-09 00:17:29 +0200.
@@ -895,7 +894,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-10-09 02:38:15 +0200) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2025-10-09 00:17:29 +0200)
Some standard options that should be set for every microvm host. @@ -12130,8 +12126,8 @@ Some standard options that should be set for every microvm host.
Some standard options that should be set vor every microvm guest. We set the default @@ -12538,7 +12534,7 @@ This holds packages that I can use as provided, or with small modifications (as # specifically needed for anki # mpv - # anki-bin + anki-bin # dirvish file previews fd @@ -14828,8 +14824,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, ... }:
@@ -14843,8 +14839,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, ... }:
@@ -14859,11 +14855,11 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, ... }:
+{ lib, config, pkgs, ... }:
{
options.swarselmodules.obsidian-tray = lib.mkEnableOption "enable obsidian applet for tray";
config = lib.mkIf config.swarselmodules.obsidian-tray {
@@ -14884,7 +14880,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
};
Service = {
- ExecStart = "${lib.getExe config.programs.obsidian.package}";
+ ExecStart = "${pkgs.obsidian}/bin/obsidian";
};
};
};
@@ -14894,11 +14890,11 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, ... }:
+{ lib, config, pkgs, ... }:
{
options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray";
config = lib.mkIf config.swarselmodules.anki-tray {
@@ -14919,11 +14915,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
};
Service = {
- # ExecStart = "${lib.getExe config.programs.anki.package}";
- ExecStart = "/etc/profiles/per-user/swarsel/bin/anki";
- Environment = [
- "QT_QPA_PLATFORM=xcb"
- ];
+ ExecStart = "${pkgs.anki-bin}/bin/anki-bin";
};
};
@@ -14933,8 +14925,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, pkgs, ... }:
@@ -14968,8 +14960,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
{ lib, config, pkgs, ... }:
@@ -15879,11 +15871,11 @@ in
{ lib, config, pkgs, nixosConfig ? config, ... }:
+{ inputs, lib, config, pkgs, nixosConfig ? config, ... }:
let
moduleName = "obsidian";
inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters;
@@ -15897,7 +15889,6 @@ in
in
{
enable = true;
- package = pkgs.obsidian;
defaultSettings = {
app = {
attachmentFolderPath = "attachments";
@@ -16019,78 +16010,6 @@ in
{ inputs, lib, config, pkgs, globals, nixosConfig ? config, ... }:
-let
- moduleName = "anki";
- inherit (config.swarselsystems) isPublic isNixos;
-in
-{
- options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} and settings";
- config = lib.mkIf config.swarselmodules.${moduleName} {
-
- sops = lib.mkIf (!isPublic && !isNixos) {
- secrets = {
- anki-user = { };
- anki-pw = { };
- };
- };
-
- programs.anki = {
- enable = true;
- package = pkgs.anki;
- hideBottomBar = true;
- hideBottomBarMode = "always";
- hideTopBar = true;
- hideTopBarMode = "always";
- reduceMotion = true;
- spacebarRatesCard = true;
- # videoDriver = "opengl";
- sync = {
- autoSync = true;
- syncMedia = true;
- url = "https://${globals.services.ankisync.domain}";
- usernameFile = nixosConfig.sops.secrets.anki-user.path;
- # this is not the password but the syncKey
- # get it by logging in or out, saving preferences and then
- # show details on the "settings wont be saved" dialog
- keyFile = nixosConfig.sops.secrets.anki-pw.path;
- };
- addons =
- let
- minimize-to-tray = pkgs.anki-utils.buildAnkiAddon
- (finalAttrs: {
- pname = "minimize-to-tray";
- version = "2.0.1";
- src = pkgs.fetchFromGitHub {
- owner = "simgunz";
- repo = "anki21-addons_minimize-to-tray";
- rev = finalAttrs.version;
- sparseCheckout = [ "src" ];
- hash = "sha256-xmvbIOfi9K0yEUtUNKtuvv2Vmqrkaa4Jie6J1s+FuqY=";
- };
- sourceRoot = "${finalAttrs.src.name}/src";
- });
- in
- [
- (minimize-to-tray.withConfig
- {
- config = {
- hide_on_startup = "true";
- };
- })
- ];
- };
- };
-
-}
-
-Sometimes my DE crashes after putting it to suspend - to be precise, it happens when I put it into suspend when I have multiple screens plugged in. I have never taken the time to debug the issue, but instead just switch to a different TTY and then use this script to kill the hanging session. @@ -19389,8 +19308,8 @@ in
{ lib, config, ... }:
@@ -19666,7 +19585,6 @@ in
anki-tray = lib.mkDefault true;
element-tray = lib.mkDefault true;
vesktop-tray = lib.mkDefault true;
- anki = lib.mkDefault true;
};
};
@@ -26449,7 +26367,7 @@ similarly, there exists an version that starts from the right.