Compare commits

...
3 Commits
5 changed files with 74 additions and 4 deletions
+3 -2
View File
@@ -9,8 +9,9 @@ report.next.filter=status:pending -WAITING -BLOCKED limit:page
report.in.columns=id,description
report.in.labels=ID,Description
report.in.description=Inbox (tasks with no project)
report.in.filter=status:pending and project:
report.in.description=Inbox (untagged)
report.in.filter=status:pending tags.none:
report.in.sort=entry+
report.recent.columns=id,description,entry
report.recent.labels=ID,Description,Age
+2
View File
@@ -0,0 +1,2 @@
uda.url.type=string
uda.url.label=URL
+10 -1
View File
@@ -67,7 +67,16 @@ in
};
ssh.enable = true;
storage.enable = true;
syncthing.enable = true;
syncthing = {
enable = true;
folders.readings = {
path = "/home/${config.host.username}/doc/readings";
devices = [
"astyanax"
"boox"
];
};
};
tailscale.enable = true;
taskwarrior.enable = true;
wol = {
+10
View File
@@ -49,6 +49,16 @@ in
secrets.enable = true;
ssh.enable = true;
storage.enable = true;
syncthing = {
enable = true;
folders.readings = {
path = "/home/${config.host.username}/doc/readings";
devices = [
"andromache"
"boox"
];
};
};
taskwarrior.enable = true;
secrets.nixSigningKey.enable = true;
+49 -1
View File
@@ -3,9 +3,42 @@
let
cfg = config.syncthing;
inherit (config.host) username;
deviceRegistry = import ./devices.nix;
deviceName = lib.types.enum (builtins.attrNames deviceRegistry);
referencedDevices = lib.unique (
lib.concatMap (folder: folder.devices) (lib.attrValues cfg.folders)
);
in
{
options.syncthing.enable = lib.mkEnableOption "syncthing";
options.syncthing = {
enable = lib.mkEnableOption "syncthing";
folders = lib.mkOption {
default = { };
type = lib.types.attrsOf (
lib.types.submodule {
options = {
path = lib.mkOption {
type = lib.types.str;
};
type = lib.mkOption {
type = lib.types.enum [
"sendreceive"
"sendonly"
"receiveonly"
"receiveencrypted"
];
default = "sendreceive";
};
devices = lib.mkOption {
type = lib.types.listOf deviceName;
default = [ ];
};
};
}
);
};
};
config = lib.mkIf cfg.enable {
users.groups.${username} = { };
@@ -17,6 +50,21 @@ in
group = username;
configDir = "/home/${username}/.local/state/syncthing";
openDefaultPorts = true;
settings = {
devices = lib.getAttrs referencedDevices deviceRegistry;
folders = lib.mapAttrs (_: folder: {
inherit (folder)
path
type
devices
;
}) cfg.folders;
options = {
globalAnnounceEnabled = false;
localAnnounceEnabled = true;
relaysEnabled = false;
};
};
};
};
}