56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|