From cc824b648b987acccc5d5f80cb905e24dc882fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Thu, 9 Oct 2025 00:19:33 +0200 Subject: [PATCH 1/4] feat[client]: add obsidian module --- SwarselSystems.org | 154 +++++++++++++++++++++++++- flake.lock | 96 +++++++++++++++- flake.nix | 1 + modules/home/common/obsidian-tray.nix | 4 +- modules/home/common/obsidian.nix | 132 ++++++++++++++++++++++ modules/home/common/packages.nix | 2 +- nix/overlays.nix | 7 ++ profiles/home/personal/default.nix | 1 + secrets/repo/pii.nix.enc | 8 +- 9 files changed, 389 insertions(+), 16 deletions(-) create mode 100644 modules/home/common/obsidian.nix diff --git a/SwarselSystems.org b/SwarselSystems.org index 93e6425..bf6e86c 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -410,6 +410,7 @@ A short overview over each input and what it does: nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11"; systems.url = "github:nix-systems/default"; swarsel-modules.url = "github:Swarsel/swarsel-modules/main"; + swarsel-nix.url = "github:Swarsel/swarsel-nix/main"; home-manager = { url = "github:nix-community/home-manager"; # url = "github:Swarsel/home-manager/module/pizauth"; @@ -1546,6 +1547,12 @@ On the structure of overlays: as you notice, all of the attributes within overla }; }; + swarsel-nix = _: prev: { + swarsel-nix = import inputs.swarsel-nix { + pkgs = prev; + }; + }; + zjstatus = _: prev: { zjstatus = inputs.zjstatus.packages.${prev.system}.default; }; @@ -1558,6 +1565,7 @@ On the structure of overlays: as you notice, all of the attributes within overla // (nixpkgs-kernel final prev) // (nixpkgs-stable24_05 final prev) // (nixpkgs-stable24_11 final prev) + // (swarsel-nix final prev) // (zjstatus final prev) // (inputs.niri-flake.overlays.niri final prev) // (inputs.vbc-nix.overlays.default final prev) @@ -11154,7 +11162,7 @@ This holds packages that I can use as provided, or with small modifications (as # nomacs libreoffice-qt xournalpp - obsidian + # obsidian # spotify vesktop # discord client # nextcloud-client # enables a systemd service that I do not want @@ -13409,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, pkgs, ... }: + { lib, config, ... }: { options.swarselmodules.obsidian-tray = lib.mkEnableOption "enable obsidian applet for tray"; config = lib.mkIf config.swarselmodules.obsidian-tray { @@ -13430,7 +13438,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi }; Service = { - ExecStart = "${pkgs.obsidian}/bin/obsidian"; + ExecStart = "${lib.getExe config.programs.obsidian.package}"; }; }; }; @@ -13470,7 +13478,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi } #+end_src -***** element service for tray +***** element service for tr #+begin_src nix-ts :tangle modules/home/common/element-tray.nix { lib, config, pkgs, ... }: @@ -14403,6 +14411,143 @@ This service changes the screen hue at night. I am not sure if that really does } #+end_src +**** Obsidian + +#+begin_src nix-ts :tangle modules/home/common/obsidian.nix + { lib, config, pkgs, nixosConfig ? config, ... }: + let + moduleName = "obsidian"; + inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters; + in + { + options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} with settings"; + config = lib.mkIf config.swarselmodules.${moduleName} { + programs.obsidian = + let + name = "Main"; + in + { + enable = true; + package = pkgs.obsidian; + defaultSettings = { + app = { + attachmentFolderPath = "attachments"; + alwaysUpdateLinks = true; + spellcheck = false; + inherit userIgnoreFilters; + vimMode = false; + newFileLocation = "current"; + }; + corePlugins = [ + "backlink" + "bookmarks" + "canvas" + "command-palette" + "daily-notes" + "editor-status" + "file-explorer" + "file-recovery" + "global-search" + "graph" + "note-composer" + "outgoing-link" + "outline" + "page-preview" + "properties" + "slides" + "switcher" + "tag-pane" + "templates" + "word-count" + ]; + communityPlugins = with pkgs.swarsel-nix; [ + advanced-tables + calendar + file-hider + linter + omnisearch + sort-and-permute-lines + tag-wrangler + tray + ]; + }; + vaults = { + ${name} = { + target = "./Obsidian/${name}"; + settings = { + appearance = { + baseFontSize = lib.mkForce 19; + }; + communityPlugins = with pkgs.swarsel-nix; [ + { + pkg = advanced-tables; + enable = true; + } + { + pkg = calendar; + enable = true; + } + { + pkg = sort-and-permute-lines; + enable = true; + } + { + pkg = tag-wrangler; + enable = true; + } + { + pkg = tray; + enable = true; + settings = { + launchOnStartup = false; + hideOnLaunch = true; + runInBackground = true; + hideTaskbarIcon = false; + createTrayIcon = true; + }; + } + { + pkg = file-hider; + enable = true; + settings = + { + hidden = true; + hiddenList = [ + "attachments" + "images" + "ltximg" + "logseq" + ]; + }; + } + { + pkg = linter; + enable = true; + settings = { + auto-correct-common-misspellings = { + skip-words-with-multiple-capitals = true; + }; + convert-bullet-list-markers = { + enabled = true; + }; + }; + } + { + pkg = omnisearch; + enable = true; + settings = { + hideExcluded = true; + }; + } + ]; + }; + }; + }; + }; + }; + } +#+end_src + *** Server :PROPERTIES: :CUSTOM_ID: h:b1a00339-6e9b-4ae4-b5dc-6fd5669a2ddb @@ -17871,6 +18016,7 @@ This holds modules that are to be used on most hosts. These are also the most im blueman-applet = lib.mkDefault true; nm-applet = lib.mkDefault true; obsidian-tray = lib.mkDefault true; + obsidian = lib.mkDefault true; anki-tray = lib.mkDefault true; element-tray = lib.mkDefault true; vesktop-tray = lib.mkDefault true; diff --git a/flake.lock b/flake.lock index f5b7234..942ab6b 100644 --- a/flake.lock +++ b/flake.lock @@ -2182,6 +2182,24 @@ "type": "github" } }, + "flake-parts_35": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_17" + }, + "locked": { + "lastModified": 1759362264, + "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-parts_4": { "inputs": { "nixpkgs-lib": [ @@ -2485,7 +2503,7 @@ }, "flake-utils_19": { "inputs": { - "systems": "systems_45" + "systems": "systems_46" }, "locked": { "lastModified": 1731533236, @@ -5848,6 +5866,21 @@ "type": "github" } }, + "nixpkgs-lib_17": { + "locked": { + "lastModified": 1754788789, + "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-lib_2": { "locked": { "lastModified": 1719876945, @@ -7231,6 +7264,22 @@ } }, "nixpkgs_58": { + "locked": { + "lastModified": 1759733170, + "narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8913c168d1c56dc49a7718685968f38752171c3b", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_59": { "locked": { "lastModified": 1754800730, "narHash": "sha256-HfVZCXic9XLBgybP0318ym3cDnGwBs/+H5MgxFVYF4I=", @@ -8616,7 +8665,8 @@ "stylix": "stylix", "swarsel": "swarsel", "swarsel-modules": "swarsel-modules_4", - "systems": "systems_43", + "swarsel-nix": "swarsel-nix", + "systems": "systems_44", "vbc-nix": "vbc-nix_6", "zjstatus": "zjstatus_6" } @@ -9539,6 +9589,27 @@ "type": "github" } }, + "swarsel-nix": { + "inputs": { + "flake-parts": "flake-parts_35", + "nixpkgs": "nixpkgs_58", + "systems": "systems_43" + }, + "locked": { + "lastModified": 1759958031, + "narHash": "sha256-rfwQQ42aQrzXYEzjQrqFA1NKoxgo9bqg/RIc2wKBsEQ=", + "owner": "Swarsel", + "repo": "swarsel-nix", + "rev": "ab8460e796c0694fe612a02817d8c290d0662188", + "type": "github" + }, + "original": { + "owner": "Swarsel", + "ref": "main", + "repo": "swarsel-nix", + "type": "github" + } + }, "swarsel_2": { "inputs": { "devshell": "devshell_5", @@ -10303,6 +10374,21 @@ } }, "systems_44": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_45": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -10317,7 +10403,7 @@ "type": "github" } }, - "systems_45": { + "systems_46": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -11076,7 +11162,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_44" + "systems": "systems_45" }, "locked": { "lastModified": 1742477270, @@ -11334,7 +11420,7 @@ "inputs": { "crane": "crane_12", "flake-utils": "flake-utils_19", - "nixpkgs": "nixpkgs_58", + "nixpkgs": "nixpkgs_59", "rust-overlay": "rust-overlay_12" }, "locked": { diff --git a/flake.nix b/flake.nix index ac839db..809843d 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,7 @@ nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11"; systems.url = "github:nix-systems/default"; swarsel-modules.url = "github:Swarsel/swarsel-modules/main"; + swarsel-nix.url = "github:Swarsel/swarsel-nix/main"; home-manager = { url = "github:nix-community/home-manager"; # url = "github:Swarsel/home-manager/module/pizauth"; diff --git a/modules/home/common/obsidian-tray.nix b/modules/home/common/obsidian-tray.nix index b6863c3..f9605b4 100644 --- a/modules/home/common/obsidian-tray.nix +++ b/modules/home/common/obsidian-tray.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, ... }: { options.swarselmodules.obsidian-tray = lib.mkEnableOption "enable obsidian applet for tray"; config = lib.mkIf config.swarselmodules.obsidian-tray { @@ -19,7 +19,7 @@ }; Service = { - ExecStart = "${pkgs.obsidian}/bin/obsidian"; + ExecStart = "${lib.getExe config.programs.obsidian.package}"; }; }; }; diff --git a/modules/home/common/obsidian.nix b/modules/home/common/obsidian.nix new file mode 100644 index 0000000..f23d789 --- /dev/null +++ b/modules/home/common/obsidian.nix @@ -0,0 +1,132 @@ +{ lib, config, pkgs, nixosConfig ? config, ... }: +let + moduleName = "obsidian"; + inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters; +in +{ + options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} with settings"; + config = lib.mkIf config.swarselmodules.${moduleName} { + programs.obsidian = + let + name = "Main"; + in + { + enable = true; + package = pkgs.obsidian; + defaultSettings = { + app = { + attachmentFolderPath = "attachments"; + alwaysUpdateLinks = true; + spellcheck = false; + inherit userIgnoreFilters; + vimMode = false; + newFileLocation = "current"; + }; + corePlugins = [ + "backlink" + "bookmarks" + "canvas" + "command-palette" + "daily-notes" + "editor-status" + "file-explorer" + "file-recovery" + "global-search" + "graph" + "note-composer" + "outgoing-link" + "outline" + "page-preview" + "properties" + "slides" + "switcher" + "tag-pane" + "templates" + "word-count" + ]; + communityPlugins = with pkgs.swarsel-nix; [ + advanced-tables + calendar + file-hider + linter + omnisearch + sort-and-permute-lines + tag-wrangler + tray + ]; + }; + vaults = { + ${name} = { + target = "./Obsidian/${name}"; + settings = { + appearance = { + baseFontSize = lib.mkForce 19; + }; + communityPlugins = with pkgs.swarsel-nix; [ + { + pkg = advanced-tables; + enable = true; + } + { + pkg = calendar; + enable = true; + } + { + pkg = sort-and-permute-lines; + enable = true; + } + { + pkg = tag-wrangler; + enable = true; + } + { + pkg = tray; + enable = true; + settings = { + launchOnStartup = false; + hideOnLaunch = true; + runInBackground = true; + hideTaskbarIcon = false; + createTrayIcon = true; + }; + } + { + pkg = file-hider; + enable = true; + settings = + { + hidden = true; + hiddenList = [ + "attachments" + "images" + "ltximg" + "logseq" + ]; + }; + } + { + pkg = linter; + enable = true; + settings = { + auto-correct-common-misspellings = { + skip-words-with-multiple-capitals = true; + }; + convert-bullet-list-markers = { + enabled = true; + }; + }; + } + { + pkg = omnisearch; + enable = true; + settings = { + hideExcluded = true; + }; + } + ]; + }; + }; + }; + }; + }; +} diff --git a/modules/home/common/packages.nix b/modules/home/common/packages.nix index 72ada06..980f4af 100644 --- a/modules/home/common/packages.nix +++ b/modules/home/common/packages.nix @@ -77,7 +77,7 @@ # nomacs libreoffice-qt xournalpp - obsidian + # obsidian # spotify vesktop # discord client # nextcloud-client # enables a systemd service that I do not want diff --git a/nix/overlays.nix b/nix/overlays.nix index 5b26cc4..04222d3 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -77,6 +77,12 @@ in }; }; + swarsel-nix = _: prev: { + swarsel-nix = import inputs.swarsel-nix { + pkgs = prev; + }; + }; + zjstatus = _: prev: { zjstatus = inputs.zjstatus.packages.${prev.system}.default; }; @@ -89,6 +95,7 @@ in // (nixpkgs-kernel final prev) // (nixpkgs-stable24_05 final prev) // (nixpkgs-stable24_11 final prev) + // (swarsel-nix final prev) // (zjstatus final prev) // (inputs.niri-flake.overlays.niri final prev) // (inputs.vbc-nix.overlays.default final prev) diff --git a/profiles/home/personal/default.nix b/profiles/home/personal/default.nix index 45cb791..e13700c 100644 --- a/profiles/home/personal/default.nix +++ b/profiles/home/personal/default.nix @@ -45,6 +45,7 @@ blueman-applet = lib.mkDefault true; nm-applet = lib.mkDefault true; obsidian-tray = lib.mkDefault true; + obsidian = lib.mkDefault true; anki-tray = lib.mkDefault true; element-tray = lib.mkDefault true; vesktop-tray = lib.mkDefault true; diff --git a/secrets/repo/pii.nix.enc b/secrets/repo/pii.nix.enc index 6faa763..7363f49 100644 --- a/secrets/repo/pii.nix.enc +++ b/secrets/repo/pii.nix.enc @@ -1,5 +1,5 @@ { - "data": "ENC[AES256_GC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AXgdiqy01/oIJVCWgfTLffJEROT5C2cbmivMjsBbNTyClJVEpZPEco5tal8+mUhWG+mNYIsKaXL8HfSVIXXNRzknBhAP47Zna86ERO8I8AF5RJWXUANnLOg+yvmXFaEFdM1XBX7Pi5pwb9gVcM5MKu0VvG3Rl28epI4+Rnin8trTSMu5LcUEBlPfygCSs/bUkfZUvt53EY/IkbUqOcEnCU/HKETUd0ARJqpjvSP6Yf1jnsuEu0lnLhEidTHHMylAElVx1NsI8la1JxzUC4yhf+ppQN7PdVx65FSstRgvKD97mhp7Bj4Fq0AtcX88uuct8VMY/VaxBSW6DVXIJxFnjtwpILGWMsVo3Nt1RQI/yx6qCnZSJFHoZgSu9dQiFsJx0FFsAsZOoSWU4lVRR8gAoxPKBhTXLe6YS7fVo2YPhMjndeS3omelFbBJHA5oL3b6sO30A7k+yBeq5vE5jIykxt3qv7+nCDveFHhbj3slVZuY,iv:9zObdum4T/ejBPPtX06ncAdgBe3ypZHbtOBaelS9100=,tag:MQxyCpZ2Z7dB5Re1ty+jGA==,type:str]", "sops": { "age": [ { @@ -27,8 +27,8 @@ "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBtU240VjVRZmJ5TGsrclJF\nRXRLbTRCZURtR0Z3d2E2eDNNeGRDODlXVEY4CllTeVFYbDJQWlRSS1RFLzAxSnlM\nZi9NU1c3cWo3YWRLcUJ2U2ZFWFBBVEEKLS0tIGtmZU9qSWdBT3RDeStaaFFDSWtk\ndkUzZXJwZUl4LzVxYXdidmxXRnNnclUKyAMZqCKSY/RQvTR4bbjLaPnGKwdBcHXc\nvtiVSrLdIdzMa6id/J07TJH5UesUmcp0wjU41MDa4aMBLy+cXhuBHA==\n-----END AGE ENCRYPTED FILE-----\n" } ], - "lastmodified": "2025-09-18T10:05:03Z", - "mac": "ENC[AES256_GCM,data:8FpGfB2vgSaZ+eddMkLakPXjfx5TbfYrzgjWj3vKJUlGoE6KMRbFnsvWVs9Vku6ia6YKV7qzA6GLpFM36b25CE2uV78BD4VThtahl8ffAGR87HzUdR6hXrDfOluWWGcKgGDlKJ1zSiez0aMdAhbCyKC+phFQl0QnyirsKD3CeVw=,iv:d66S50SmO4yiI48eGxJIPZg3WtosaNYKq+kQ/SFyuD0=,tag:NAVPR0mU0NUP6T6mJdCbkg==,type:str]", + "lastmodified": "2025-10-08T21:54:23Z", + "mac": "ENC[AES256_GCM,data:vjpvEgzViQDpE4DQE34xKj3dj3yvva1NvjZqfzs9R3uAtqWu2fe5jkLcrMI4t35co3lP84VUwKM5HQ33wKYvmaCsPrM2tvPLI4KSXWU1e+TSfSFphDr21OGZImEUW5Je9hhmgo/rg37Dkc/hq3npoeG3mtHdl6zw2c8URgi/vqk=,iv:fZN8la3P4lalI0AGPJbHOo5D1Q+EmV3SOKg3s47/u0o=,tag:OLsMZbIMRV6X5Wc8NpDFnA==,type:str]", "pgp": [ { "created_at": "2025-06-13T20:13:06Z", @@ -37,6 +37,6 @@ } ], "unencrypted_suffix": "_unencrypted", - "version": "3.10.2" + "version": "3.11.0" } } From 49c7cae7f99033026c635a661124e3fc97f7adfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Thu, 9 Oct 2025 00:19:56 +0200 Subject: [PATCH 2/4] fix: stop network from being redefined --- SwarselSystems.org | 2 +- modules/nixos/client/network.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index bf6e86c..0e04db4 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -5048,7 +5048,7 @@ Here I only enable =networkmanager= and a few default networks. The rest of the wifi = { # mac-address-blacklist = ""; mode = "infrastructure"; - band = "a"; + # band = "a"; ssid = wlan1; }; wifi-security = { diff --git a/modules/nixos/client/network.nix b/modules/nixos/client/network.nix index 9dc06c7..aad336f 100644 --- a/modules/nixos/client/network.nix +++ b/modules/nixos/client/network.nix @@ -117,7 +117,7 @@ in wifi = { # mac-address-blacklist = ""; mode = "infrastructure"; - band = "a"; + # band = "a"; ssid = wlan1; }; wifi-security = { From dbe12c8d5ea8304906a815b2b39f5d0f659cce34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Thu, 9 Oct 2025 00:20:13 +0200 Subject: [PATCH 3/4] chore: move some folder to new locations --- SwarselSystems.org | 16 +- files/emacs/init.el | 12 +- index.html | 237 +++++++++++++++++++++++------ modules/nixos/client/syncthing.nix | 4 +- 4 files changed, 209 insertions(+), 60 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 0e04db4..6de8c21 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -5374,12 +5374,12 @@ Here I disable global completion to prevent redundant compinit calls and cache i id = "default"; }; "Obsidian" = { - path = "${homeDir}/Nextcloud/Obsidian"; + path = "${homeDir}/Obsidian"; inherit devices; id = "yjvni-9eaa7"; }; "Org" = { - path = "${homeDir}/Nextcloud/Org"; + path = "${homeDir}/Org"; inherit devices; id = "a7xnl-zjj3d"; }; @@ -19850,13 +19850,13 @@ This part of the configuration mostly makes some aesthetic changes, enables neat (defun swarsel/org-agenda-done-and-archive () "Mark TODO at point as DONE, archive it, and save all agenda files." (interactive) - (let ((org-archive-location "~/Nextcloud/Org/Archive.org::Archive")) + (let ((org-archive-location "~/Org/Archive.org::Archive")) (org-agenda-todo "DONE") (org-agenda-archive) (dolist (buf (buffer-list)) (with-current-buffer buf (when (and buffer-file-name - (string-prefix-p (expand-file-name "~/Nextcloud/Org/") (file-truename buffer-file-name)) + (string-prefix-p (expand-file-name "~/Org/") (file-truename buffer-file-name)) (derived-mode-p 'org-mode)) (save-buffer)))))) @@ -19885,14 +19885,14 @@ This part of the configuration mostly makes some aesthetic changes, enables neat (setq org-image-actual-width nil) (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))) - (setq org-agenda-files '("/home/swarsel/Nextcloud/Org/Tasks.org" - "/home/swarsel/Nextcloud/Org/Archive.org" + (setq org-agenda-files '("/home/swarsel/Org/Tasks.org" + "/home/swarsel/Org/Archive.org" )) (setq org-capture-templates - '(("t" "Todo" entry (file+headline "~/Nextcloud/Org/Tasks.org" "Inbox") + '(("t" "Todo" entry (file+headline "~/Org/Tasks.org" "Inbox") "* TODO %?\n %i\n %a") - ("j" "Journal" entry (file+datetree "~/Nextcloud/Org/Journal.org") + ("j" "Journal" entry (file+datetree "~/Org/Journal.org") "* %?\nEntered on %U\n %i\n %a"))) (setq org-refile-targets diff --git a/files/emacs/init.el b/files/emacs/init.el index 7f8999a..935c1ee 100644 --- a/files/emacs/init.el +++ b/files/emacs/init.el @@ -807,13 +807,13 @@ create a new one." (defun swarsel/org-agenda-done-and-archive () "Mark TODO at point as DONE, archive it, and save all agenda files." (interactive) - (let ((org-archive-location "~/Nextcloud/Org/Archive.org::Archive")) + (let ((org-archive-location "~/Org/Archive.org::Archive")) (org-agenda-todo "DONE") (org-agenda-archive) (dolist (buf (buffer-list)) (with-current-buffer buf (when (and buffer-file-name - (string-prefix-p (expand-file-name "~/Nextcloud/Org/") (file-truename buffer-file-name)) + (string-prefix-p (expand-file-name "~/Org/") (file-truename buffer-file-name)) (derived-mode-p 'org-mode)) (save-buffer)))))) @@ -842,14 +842,14 @@ create a new one." (setq org-image-actual-width nil) (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\["))) - (setq org-agenda-files '("/home/swarsel/Nextcloud/Org/Tasks.org" - "/home/swarsel/Nextcloud/Org/Archive.org" + (setq org-agenda-files '("/home/swarsel/Org/Tasks.org" + "/home/swarsel/Org/Archive.org" )) (setq org-capture-templates - '(("t" "Todo" entry (file+headline "~/Nextcloud/Org/Tasks.org" "Inbox") + '(("t" "Todo" entry (file+headline "~/Org/Tasks.org" "Inbox") "* TODO %?\n %i\n %a") - ("j" "Journal" entry (file+datetree "~/Nextcloud/Org/Journal.org") + ("j" "Journal" entry (file+datetree "~/Org/Journal.org") "* %?\nEntered on %U\n %i\n %a"))) (setq org-refile-targets diff --git a/index.html b/index.html index 8e78e79..11c1d62 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configurationo @@ -443,8 +443,8 @@
  • 3.2.5.8. Hibernation
  • 3.2.5.9. BTRFS
  • 3.2.5.10. work
  • -
  • 3.2.5.11. microvm-host
  • -
  • 3.2.5.12. microvm-guest
  • +
  • 3.2.5.11. microvm-host
  • +
  • 3.2.5.12. microvm-guest
  • @@ -494,12 +494,12 @@
  • 3.3.1.30.3. Mako
  • 3.3.1.30.4. SwayOSD
  • 3.3.1.30.5. yubikey-touch-detector
  • -
  • 3.3.1.30.6. blueman-applet
  • -
  • 3.3.1.30.7. network-manager-applet
  • -
  • 3.3.1.30.8. obsidian service for tray
  • -
  • 3.3.1.30.9. anki service for tray
  • -
  • 3.3.1.30.10. element service for tray
  • -
  • 3.3.1.30.11. vesktop service for tray
  • +
  • 3.3.1.30.6. blueman-applet
  • +
  • 3.3.1.30.7. network-manager-applet
  • +
  • 3.3.1.30.8. obsidian service for tray
  • +
  • 3.3.1.30.9. anki service for tray
  • +
  • 3.3.1.30.10. element service for tr
  • +
  • 3.3.1.30.11. vesktop service for tray
  • 3.3.1.31. Sway
  • @@ -508,6 +508,7 @@
  • 3.3.1.34. gpg-agent
  • 3.3.1.35. gammastep
  • 3.3.1.36. Spicetify
  • +
  • 3.3.1.37. Obsidian
  • 3.3.2. Server @@ -572,7 +573,7 @@
  • 3.5.31. swarsel-build
  • 3.5.32. swarsel-instantiate
  • 3.5.33. sshrm
  • -
  • 3.5.34. endme
  • +
  • 3.5.34. endme
  • 3.6. Profiles @@ -581,7 +582,7 @@
    • 3.6.1.1. Personal
    • 3.6.1.2. Minimal
    • -
    • 3.6.1.3. Optionals
    • +
    • 3.6.1.3. Optionals
    • 3.6.1.4. Chaostheatre
    • 3.6.1.5. Work
    • 3.6.1.6. Uni
    • @@ -824,7 +825,7 @@

      -This file has 94167 words spanning 24116 lines and was last revised on 2025-10-07 21:23:03 +0200. +This file has 94403 words spanning 24261 lines and was last revised on 2025-10-09 00:17:29 +0200.

      @@ -893,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-07 21:23:03 +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)

    @@ -1338,6 +1339,7 @@ This provides devshell support for flake-parts
  • nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11"; systems.url = "github:nix-systems/default"; swarsel-modules.url = "github:Swarsel/swarsel-modules/main"; + swarsel-nix.url = "github:Swarsel/swarsel-nix/main"; home-manager = { url = "github:nix-community/home-manager"; # url = "github:Swarsel/home-manager/module/pizauth"; @@ -2590,6 +2592,12 @@ in }; }; + swarsel-nix = final: prev: { + swarsel-nix = import inputs.swarsel-nix { + pkgs = prev; + }; + }; + zjstatus = _: prev: { zjstatus = inputs.zjstatus.packages.${prev.system}.default; }; @@ -2602,6 +2610,7 @@ in // (nixpkgs-kernel final prev) // (nixpkgs-stable24_05 final prev) // (nixpkgs-stable24_11 final prev) + // (swarsel-nix final prev) // (zjstatus final prev) // (inputs.niri-flake.overlays.niri final prev) // (inputs.vbc-nix.overlays.default final prev) @@ -6212,7 +6221,7 @@ in wifi = { # mac-address-blacklist = ""; mode = "infrastructure"; - band = "a"; + # band = "a"; ssid = wlan1; }; wifi-security = { @@ -6549,12 +6558,12 @@ in id = "default"; }; "Obsidian" = { - path = "${homeDir}/Nextcloud/Obsidian"; + path = "${homeDir}/Obsidian"; inherit devices; id = "yjvni-9eaa7"; }; "Org" = { - path = "${homeDir}/Nextcloud/Org"; + path = "${homeDir}/Org"; inherit devices; id = "a7xnl-zjj3d"; }; @@ -12090,8 +12099,8 @@ in -
    -
    3.2.5.11. microvm-host
    +
    +
    3.2.5.11. microvm-host

    Some standard options that should be set for every microvm host. @@ -12117,8 +12126,8 @@ Some standard options that should be set for every microvm host.

    -
    -
    3.2.5.12. microvm-guest
    +
    +
    3.2.5.12. microvm-guest

    Some standard options that should be set vor every microvm guest. We set the default @@ -12484,7 +12493,7 @@ This holds packages that I can use as provided, or with small modifications (as # nomacs libreoffice-qt xournalpp - obsidian + # obsidian # spotify vesktop # discord client # nextcloud-client # enables a systemd service that I do not want @@ -14815,8 +14824,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi

    -
    -
    3.3.1.30.6. blueman-applet
    +
    +
    3.3.1.30.6. blueman-applet
    { lib, config, ... }:
    @@ -14830,8 +14839,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.7. network-manager-applet
    +
    +
    3.3.1.30.7. network-manager-applet
    { lib, config, ... }:
    @@ -14846,8 +14855,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.8. obsidian service for tray
    +
    +
    3.3.1.30.8. obsidian service for tray
    { lib, config, pkgs, ... }:
    @@ -14881,8 +14890,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.9. anki service for tray
    +
    +
    3.3.1.30.9. anki service for tray
    { lib, config, pkgs, ... }:
    @@ -14916,8 +14925,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.10. element service for tray
    +
    +
    3.3.1.30.10. element service for tr
    { lib, config, pkgs, ... }:
    @@ -14951,8 +14960,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.11. vesktop service for tray
    +
    +
    3.3.1.30.11. vesktop service for tray
    { lib, config, pkgs, ... }:
    @@ -15862,6 +15871,145 @@ in
     
    +
    +
    3.3.1.37. Obsidian
    +
    +
    +
    { inputs, lib, config, pkgs, nixosConfig ? config, ... }:
    +  let
    +    moduleName = "obsidian";
    +    inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters;
    +  in
    +  {
    +    options.swarselmodules.${moduleName} = lib.mkEnableOption "enable ${moduleName} with settings";
    +    config = lib.mkIf config.swarselmodules.${moduleName} {
    +      programs.obsidian =
    +        let
    +          name = "Main";
    +        in
    +        {
    +          enable = true;
    +          defaultSettings = {
    +            app = {
    +              attachmentFolderPath = "attachments";
    +              alwaysUpdateLinks = true;
    +              spellcheck = false;
    +              inherit userIgnoreFilters;
    +              vimMode = false;
    +              newFileLocation = "current";
    +            };
    +            corePlugins = [
    +              "backlink"
    +              "bookmarks"
    +              "canvas"
    +              "command-palette"
    +              "daily-notes"
    +              "editor-status"
    +              "file-explorer"
    +              "file-recovery"
    +              "global-search"
    +              "graph"
    +              "note-composer"
    +              "outgoing-link"
    +              "outline"
    +              "page-preview"
    +              "properties"
    +              "slides"
    +              "switcher"
    +              "tag-pane"
    +              "templates"
    +              "word-count"
    +            ];
    +            communityPlugins = with pkgs.swarsel-nix; [
    +              advanced-tables
    +              calendar
    +              file-hider
    +              linter
    +              omnisearch
    +              sort-and-permute-lines
    +              tag-wrangler
    +              tray
    +            ];
    +          };
    +          vaults = {
    +            ${name} = {
    +              target = "./Obsidian/${name}";
    +              settings = {
    +                appearance = {
    +                  baseFontSize = lib.mkForce 19;
    +                };
    +                communityPlugins = with pkgs.swarsel-nix; [
    +                  {
    +                    pkg = advanced-tables;
    +                    enable = true;
    +                  }
    +                  {
    +                    pkg = calendar;
    +                    enable = true;
    +                  }
    +                  {
    +                    pkg = sort-and-permute-lines;
    +                    enable = true;
    +                  }
    +                  {
    +                    pkg = tag-wrangler;
    +                    enable = true;
    +                  }
    +                  {
    +                    pkg = tray;
    +                    enable = true;
    +                    settings = {
    +                      launchOnStartup = false;
    +                      hideOnLaunch = true;
    +                      runInBackground = true;
    +                      hideTaskbarIcon = false;
    +                      createTrayIcon = true;
    +                    };
    +                  }
    +                  {
    +                    pkg = file-hider;
    +                    enable = true;
    +                    settings =
    +                      {
    +                        hidden = true;
    +                        hiddenList = [
    +                          "attachments"
    +                          "images"
    +                          "ltximg"
    +                          "logseq"
    +                        ];
    +                      };
    +                  }
    +                  {
    +                    pkg = linter;
    +                    enable = true;
    +                    settings = {
    +                      auto-correct-common-misspellings = {
    +                        skip-words-with-multiple-capitals = true;
    +                      };
    +                      convert-bullet-list-markers = {
    +                        enabled = true;
    +                      };
    +                    };
    +                  }
    +                  {
    +                    pkg = omnisearch;
    +                    enable = true;
    +                    settings = {
    +                      hideExcluded = true;
    +                    };
    +                  }
    +                ];
    +              };
    +            };
    +          };
    +        };
    +    };
    +  }
    +
    +
    +
    +

    3.3.2. Server

    @@ -18999,8 +19147,8 @@ writeShellApplication {
    -
    -

    3.5.34. endme

    +
    +

    3.5.34. endme

    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. @@ -19160,8 +19308,8 @@ in

    -
    -
    3.6.1.3. Optionals
    +
    +
    3.6.1.3. Optionals
    { lib, config, ... }:
    @@ -19433,6 +19581,7 @@ in
           blueman-applet = lib.mkDefault true;
           nm-applet = lib.mkDefault true;
           obsidian-tray = lib.mkDefault true;
    +      obsidian = lib.mkDefault true;
           anki-tray = lib.mkDefault true;
           element-tray = lib.mkDefault true;
           vesktop-tray = lib.mkDefault true;
    @@ -21487,13 +21636,13 @@ This part of the configuration mostly makes some aesthetic changes, enables neat
     (defun swarsel/org-agenda-done-and-archive ()
       "Mark TODO at point as DONE, archive it, and save all agenda files."
       (interactive)
    -  (let ((org-archive-location "~/Nextcloud/Org/Archive.org::Archive"))
    +  (let ((org-archive-location "~/Org/Archive.org::Archive"))
         (org-agenda-todo "DONE")
         (org-agenda-archive)
         (dolist (buf (buffer-list))
           (with-current-buffer buf
             (when (and buffer-file-name
    -                   (string-prefix-p (expand-file-name "~/Nextcloud/Org/") (file-truename buffer-file-name))
    +                   (string-prefix-p (expand-file-name "~/Org/") (file-truename buffer-file-name))
                        (derived-mode-p 'org-mode))
               (save-buffer))))))
     
    @@ -21522,14 +21671,14 @@ This part of the configuration mostly makes some aesthetic changes, enables neat
       (setq org-image-actual-width nil)
       (setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")))
     
    -  (setq org-agenda-files '("/home/swarsel/Nextcloud/Org/Tasks.org"
    -                           "/home/swarsel/Nextcloud/Org/Archive.org"
    +  (setq org-agenda-files '("/home/swarsel/Org/Tasks.org"
    +                           "/home/swarsel/Org/Archive.org"
                                ))
     
       (setq org-capture-templates
    -        '(("t" "Todo" entry (file+headline "~/Nextcloud/Org/Tasks.org" "Inbox")
    +        '(("t" "Todo" entry (file+headline "~/Org/Tasks.org" "Inbox")
                "* TODO %?\n  %i\n  %a")
    -          ("j" "Journal" entry (file+datetree "~/Nextcloud/Org/Journal.org")
    +          ("j" "Journal" entry (file+datetree "~/Org/Journal.org")
                "* %?\nEntered on %U\n  %i\n  %a")))
     
       (setq org-refile-targets
    @@ -26218,7 +26367,7 @@ similarly, there exists an version that starts from the right.
     

    Author: Leon Schwarzäugl

    -

    Created: 2025-10-07 Di 21:23

    +

    Created: 2025-10-09 Do 00:17

    Validate

    diff --git a/modules/nixos/client/syncthing.nix b/modules/nixos/client/syncthing.nix index d7ca383..3410f77 100644 --- a/modules/nixos/client/syncthing.nix +++ b/modules/nixos/client/syncthing.nix @@ -27,12 +27,12 @@ in id = "default"; }; "Obsidian" = { - path = "${homeDir}/Nextcloud/Obsidian"; + path = "${homeDir}/Obsidian"; inherit devices; id = "yjvni-9eaa7"; }; "Org" = { - path = "${homeDir}/Nextcloud/Org"; + path = "${homeDir}/Org"; inherit devices; id = "a7xnl-zjj3d"; }; From 0287e9d582cab56589d0d364f3f60646546b0815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Thu, 9 Oct 2025 02:39:26 +0200 Subject: [PATCH 4/4] feat[client]: add anki module --- SwarselSystems.org | 128 ++++++++++--- index.html | 170 +++++++++++++----- modules/home/common/anki-tray.nix | 8 +- modules/home/common/anki.nix | 64 +++++++ modules/home/common/packages.nix | 2 +- modules/nixos/common/home-manager-secrets.nix | 3 + profiles/home/personal/default.nix | 1 + secrets/general/secrets.yaml | 9 +- 8 files changed, 310 insertions(+), 75 deletions(-) create mode 100644 modules/home/common/anki.nix diff --git a/SwarselSystems.org b/SwarselSystems.org index 6de8c21..67399e8 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -4031,6 +4031,9 @@ 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 { @@ -11203,7 +11206,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 @@ -13449,36 +13452,40 @@ 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, pkgs, ... }: - { - options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray"; - config = lib.mkIf config.swarselmodules.anki-tray { + { lib, config, ... }: + { + 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 = "${pkgs.anki-bin}/bin/anki-bin"; - }; - }; + Service = { + # ExecStart = "${lib.getExe config.programs.anki.package}"; + ExecStart = "/etc/profiles/per-user/swarsel/bin/anki"; + Environment = [ + "QT_QPA_PLATFORM=xcb" + ]; + }; + }; - }; - } + }; + } #+end_src -***** element service for tr +***** element service for tray #+begin_src nix-ts :tangle modules/home/common/element-tray.nix { lib, config, pkgs, ... }: @@ -14548,6 +14555,76 @@ 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 @@ -18020,6 +18097,7 @@ 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 11c1d62..82e30e2 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configurationo @@ -443,8 +443,8 @@
  • 3.2.5.8. Hibernation
  • 3.2.5.9. BTRFS
  • 3.2.5.10. work
  • -
  • 3.2.5.11. microvm-host
  • -
  • 3.2.5.12. microvm-guest
  • +
  • 3.2.5.11. microvm-host
  • +
  • 3.2.5.12. microvm-guest
  • @@ -494,12 +494,12 @@
  • 3.3.1.30.3. Mako
  • 3.3.1.30.4. SwayOSD
  • 3.3.1.30.5. yubikey-touch-detector
  • -
  • 3.3.1.30.6. blueman-applet
  • -
  • 3.3.1.30.7. network-manager-applet
  • -
  • 3.3.1.30.8. obsidian service for tray
  • -
  • 3.3.1.30.9. anki service for tray
  • -
  • 3.3.1.30.10. element service for tr
  • -
  • 3.3.1.30.11. vesktop service for tray
  • +
  • 3.3.1.30.6. blueman-applet
  • +
  • 3.3.1.30.7. network-manager-applet
  • +
  • 3.3.1.30.8. obsidian service for tray
  • +
  • 3.3.1.30.9. anki service for tray
  • +
  • 3.3.1.30.10. element service for tray
  • +
  • 3.3.1.30.11. vesktop service for tray
  • 3.3.1.31. Sway
  • @@ -508,7 +508,8 @@
  • 3.3.1.34. gpg-agent
  • 3.3.1.35. gammastep
  • 3.3.1.36. Spicetify
  • -
  • 3.3.1.37. Obsidian
  • +
  • 3.3.1.37. Obsidian
  • +
  • 3.3.1.38. Anki
  • 3.3.2. Server @@ -573,7 +574,7 @@
  • 3.5.31. swarsel-build
  • 3.5.32. swarsel-instantiate
  • 3.5.33. sshrm
  • -
  • 3.5.34. endme
  • +
  • 3.5.34. endme
  • 3.6. Profiles @@ -582,7 +583,7 @@
  • -This file has 94403 words spanning 24261 lines and was last revised on 2025-10-09 00:17:29 +0200. +This file has 94619 words spanning 24340 lines and was last revised on 2025-10-09 02:38:15 +0200.

    @@ -894,7 +895,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 00:17:29 +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 02:38:15 +0200)

    @@ -2592,7 +2593,7 @@ in }; }; - swarsel-nix = final: prev: { + swarsel-nix = _: prev: { swarsel-nix = import inputs.swarsel-nix { pkgs = prev; }; @@ -5153,6 +5154,9 @@ 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 { @@ -12099,8 +12103,8 @@ in
    -
    -
    3.2.5.11. microvm-host
    +
    +
    3.2.5.11. microvm-host

    Some standard options that should be set for every microvm host. @@ -12126,8 +12130,8 @@ Some standard options that should be set for every microvm host.

    -
    -
    3.2.5.12. microvm-guest
    +
    +
    3.2.5.12. microvm-guest

    Some standard options that should be set vor every microvm guest. We set the default @@ -12534,7 +12538,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 @@ -14824,8 +14828,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi

    -
    -
    3.3.1.30.6. blueman-applet
    +
    +
    3.3.1.30.6. blueman-applet
    { lib, config, ... }:
    @@ -14839,8 +14843,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.7. network-manager-applet
    +
    +
    3.3.1.30.7. network-manager-applet
    { lib, config, ... }:
    @@ -14855,11 +14859,11 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.8. obsidian service for tray
    +
    +
    3.3.1.30.8. obsidian service for tray
    -
    { lib, config, pkgs, ... }:
    +
    { lib, config, ... }:
     {
       options.swarselmodules.obsidian-tray = lib.mkEnableOption "enable obsidian applet for tray";
       config = lib.mkIf config.swarselmodules.obsidian-tray {
    @@ -14880,7 +14884,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
           };
     
           Service = {
    -        ExecStart = "${pkgs.obsidian}/bin/obsidian";
    +        ExecStart = "${lib.getExe config.programs.obsidian.package}";
           };
         };
       };
    @@ -14890,11 +14894,11 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.9. anki service for tray
    +
    +
    3.3.1.30.9. anki service for tray
    -
    { lib, config, pkgs, ... }:
    +
    { lib, config, ... }:
     {
       options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray";
       config = lib.mkIf config.swarselmodules.anki-tray {
    @@ -14915,7 +14919,11 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
           };
     
           Service = {
    -        ExecStart = "${pkgs.anki-bin}/bin/anki-bin";
    +        # ExecStart = "${lib.getExe config.programs.anki.package}";
    +        ExecStart = "/etc/profiles/per-user/swarsel/bin/anki";
    +        Environment = [
    +          "QT_QPA_PLATFORM=xcb"
    +        ];
           };
         };
     
    @@ -14925,8 +14933,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.10. element service for tr
    +
    +
    3.3.1.30.10. element service for tray
    { lib, config, pkgs, ... }:
    @@ -14960,8 +14968,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.30.11. vesktop service for tray
    +
    +
    3.3.1.30.11. vesktop service for tray
    { lib, config, pkgs, ... }:
    @@ -15871,11 +15879,11 @@ in
     
    -
    -
    3.3.1.37. Obsidian
    +
    +
    3.3.1.37. Obsidian
    -
    { inputs, lib, config, pkgs, nixosConfig ? config, ... }:
    +
    { lib, config, pkgs, nixosConfig ? config, ... }:
       let
         moduleName = "obsidian";
         inherit (nixosConfig.repo.secrets.common.obsidian) userIgnoreFilters;
    @@ -15889,6 +15897,7 @@ in
             in
             {
               enable = true;
    +          package = pkgs.obsidian;
               defaultSettings = {
                 app = {
                   attachmentFolderPath = "attachments";
    @@ -16010,6 +16019,78 @@ in
     
    +
    +
    3.3.1.38. Anki
    +
    +
    +
    { 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";
    +            };
    +          })
    +        ];
    +    };
    +  };
    +
    +}
    +
    +
    +
    +

    3.3.2. Server

    @@ -19147,8 +19228,8 @@ writeShellApplication {
    -
    -

    3.5.34. endme

    +
    +

    3.5.34. endme

    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. @@ -19308,8 +19389,8 @@ in

    -
    -
    3.6.1.3. Optionals
    +
    +
    3.6.1.3. Optionals
    { lib, config, ... }:
    @@ -19585,6 +19666,7 @@ in
           anki-tray = lib.mkDefault true;
           element-tray = lib.mkDefault true;
           vesktop-tray = lib.mkDefault true;
    +      anki = lib.mkDefault true;
         };
       };
     
    @@ -26367,7 +26449,7 @@ similarly, there exists an version that starts from the right.
     

    Author: Leon Schwarzäugl

    -

    Created: 2025-10-09 Do 00:17

    +

    Created: 2025-10-09 Do 02:38

    Validate

    diff --git a/modules/home/common/anki-tray.nix b/modules/home/common/anki-tray.nix index 3cb0f64..d70fa67 100644 --- a/modules/home/common/anki-tray.nix +++ b/modules/home/common/anki-tray.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, ... }: { options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray"; config = lib.mkIf config.swarselmodules.anki-tray { @@ -19,7 +19,11 @@ }; Service = { - ExecStart = "${pkgs.anki-bin}/bin/anki-bin"; + # ExecStart = "${lib.getExe config.programs.anki.package}"; + ExecStart = "/etc/profiles/per-user/swarsel/bin/anki"; + Environment = [ + "QT_QPA_PLATFORM=xcb" + ]; }; }; diff --git a/modules/home/common/anki.nix b/modules/home/common/anki.nix new file mode 100644 index 0000000..f91d3fb --- /dev/null +++ b/modules/home/common/anki.nix @@ -0,0 +1,64 @@ +{ 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"; + }; + }) + ]; + }; + }; + +} diff --git a/modules/home/common/packages.nix b/modules/home/common/packages.nix index 980f4af..10622dc 100644 --- a/modules/home/common/packages.nix +++ b/modules/home/common/packages.nix @@ -118,7 +118,7 @@ # specifically needed for anki # mpv - anki-bin + # anki-bin # dirvish file previews fd diff --git a/modules/nixos/common/home-manager-secrets.nix b/modules/nixos/common/home-manager-secrets.nix index f6299ef..7c2a3e1 100644 --- a/modules/nixos/common/home-manager-secrets.nix +++ b/modules/nixos/common/home-manager-secrets.nix @@ -22,6 +22,9 @@ 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 { diff --git a/profiles/home/personal/default.nix b/profiles/home/personal/default.nix index e13700c..3ca38e1 100644 --- a/profiles/home/personal/default.nix +++ b/profiles/home/personal/default.nix @@ -49,6 +49,7 @@ anki-tray = lib.mkDefault true; element-tray = lib.mkDefault true; vesktop-tray = lib.mkDefault true; + anki = lib.mkDefault true; }; }; diff --git a/secrets/general/secrets.yaml b/secrets/general/secrets.yaml index 5e3cd83..f2d0e18 100644 --- a/secrets/general/secrets.yaml +++ b/secrets/general/secrets.yaml @@ -25,6 +25,9 @@ github-api-token: ENC[AES256_GCM,data:9AhHkmv4JUjmir77INYflGvjNWW/E17FmfoXs5IUnA emacs-radicale-pw: ENC[AES256_GCM,data:BIORG0geX8s1WOA=,iv:SeoVn8xHlqQGxZzHrm5I5LITMoutRnz3OygswDc96ew=,tag:C3S4a8IEvCjHgAyRrCaaRw==,type:str] #ENC[AES256_GCM,data:qsBNKxd3Ng==,iv:1fNMDJt7vgKFSdghYBZsuDoZ1sWvzj1Zu8NmkjX6Zh8=,tag:0D7EsgN8B1z7/y4iZS/PtQ==,type:comment] github-nixpkgs-review-token: ENC[AES256_GCM,data:/4ssZAEwEc9fZeR69GCvLMm4eRv4uabyDbGDGqfRUllO5DVSbZxO+A==,iv:mcARvAyPAB9pyCGFy2A/6qeZbSepHyWVNyusaQ5ze3I=,tag:o7AP6g8XHkPUaCnXK3CFig==,type:str] +#ENC[AES256_GCM,data:PI5MX6PgK1y0lqyoYA0=,iv:25UAvFaANHFD04GRafGlCzOc5h+15YPtSES2z2tmpXw=,tag:+XLwQ01+AtGWjtsSQhQ1AQ==,type:comment] +anki-user: ENC[AES256_GCM,data:WoGaNDAHFw==,iv:ZSjHfKMIjlgOuvGl7hVxJc1fE80nfxxXYLgsKangBCs=,tag:UP8ZI7gzOrJJjNDHovIkyg==,type:str] +anki-pw: ENC[AES256_GCM,data:z2SCsSvZIqN2/2VK1EdmcAnl42x5A15PAiK932k3n50Vj1jczGRoSw==,iv:keQCutY4vizVzu5YzPBJLgDLveYDb2VGeEnYmO7CeQw=,tag:KGplFfC5xktNAOTbIlt+Tg==,type:str] sops: age: - recipient: age1h72072slm2pthn9m2qwjsyy2dsazc6hz97kpzh4gksvv0r2jqecqul8w63 @@ -90,8 +93,8 @@ sops: SjV6L3crUkdLWTlsNFgyRHBla2FFam8KILYsNbLdCirfoC/Vex8yEYpS2G4O0EQP wa1xzPk3Ue0/g67dv5UZFhUn0ZB2XGFC3kEPWpptTj0VL+9Z/r0zKA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-08-13T07:33:50Z" - mac: ENC[AES256_GCM,data:7RjYDh/n+j9lU6Sz3NRDi5tWX/7QL+HK43hOImCQkiHbBaO4n/Gms6hAAzkWfHpfbW9cm02mcPsmQLE85xlzD0DaJz2x4CVQ1wT26D5Sth6RP/rWGiVeoN4shncxuR0Ro0gTFFkTLYftJT2v/4LocPxIeEuOyQrX/J45UXUnhh4=,iv:309gb4TVc/uf6DOfPmSuqWTDt2Newi5rrFmBM2O0e+0=,tag:aVU9bVNTiSdeo4DkvUeJpA==,type:str] + lastmodified: "2025-10-08T23:35:53Z" + mac: ENC[AES256_GCM,data:TxbNh/NiACHx3IwOi2esAfPf/jHV9yO86PRGarL3QQDTVB+nh5in+lx06oFh3bO5aJwpG6MWH9ZpPbX+3buyr2BTNrb6vc2YctSzaQU+ap5rvHf4AoKT3rC9rjHaR0WqJIPGV7HYcnFcoznULMrHqMTKMeEhUMqNl7xxAwxfIyk=,iv:9HAgoJN4xgxevM92K9j/5I2UYyIydOe9O+Cy3oL6/mo=,tag:1sRN7mrsRkAfp0LuZ6knBg==,type:str] pgp: - created_at: "2025-07-10T23:51:26Z" enc: |- @@ -125,4 +128,4 @@ sops: -----END PGP MESSAGE----- fp: 4BE7925262289B476DBBC17B76FD3810215AE097 unencrypted_suffix: _unencrypted - version: 3.10.2 + version: 3.11.0