the refactor continues!

This commit is contained in:
martyTF 2026-04-01 16:00:52 +02:00
parent db2103a37d
commit 90513a119c
21 changed files with 216 additions and 234 deletions

View file

@ -0,0 +1,56 @@
{
config,
pkgs,
inputs,
lib,
...
}:
{
options = {
apps.misc = {
obsidian.enable = lib.mkEnableOption "enable obsidian";
bitwarden.enable = lib.mkEnableOption "enable bitwarden";
blender.enable = lib.mkEnableOption "enable blender";
syncthing = {
enable = lib.mkEnableOption "enable syncthing";
devices = lib.mkOption {
default = { };
description = ''
set syncthing devices
'';
};
folders = lib.mkOption {
default = { };
description = ''
set syncthing folders
'';
};
};
};
};
config = {
environment.systemPackages = with pkgs; [
(lib.mkIf (config.apps.misc.obsidian.enable) obsidian)
(lib.mkIf (config.apps.misc.bitwarden.enable) rbw (
lib.mkIf (config.desktop.shell.rofi.enable) pinentry-curses rofi-rbw
))
(lib.mkIf (config.apps.misc.blender.enable) blender)
];
services = {
syncthing = lib.mkIf config.apps.misc.syncthing.enable {
enable = true;
tray.enable = true;
guiAddress = "0.0.0.0:8384";
settings = {
devices = config.apps.misc.syncthing.devices;
folders = config.apps.misc.syncthing.folders;
};
overrideDevices = lib.mkIf (config.apps.misc.syncthing.devices == { }) false;
overrideFolders = lib.mkIf (config.apps.misc.syncthing.folders == { }) false;
};
};
};
}