syncthing: Declarative

I could split this commit in more but I won't.
The first commit in this repository said it would be the last legible
one, and I haven't followed that, so YOLO.
This commit is contained in:
Geoffrey Frogeye 2024-06-23 23:57:03 +02:00
parent b7d56a3118
commit 8edb670486
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
20 changed files with 222 additions and 45 deletions

View file

@ -64,17 +64,23 @@
};
xdg = {
userDirs = {
enable = true; # TODO Which ones do we want?
createDirectories = true;
# French, because then it there's a different initial for each, making navigation easier
desktop = null;
download = "${config.home.homeDirectory}/Téléchargements";
pictures = "${config.home.homeDirectory}/Images";
publicShare = null;
templates = null;
videos = "${config.home.homeDirectory}/Vidéos";
};
userDirs =
let
wellKnownUserDirs = [ "desktop" "documents" "download" "music" "pictures" "publicShare" "templates" "videos" ];
wellKnownUserDirsNulled = builtins.listToAttrs (builtins.map (name: { inherit name; value = null; }) wellKnownUserDirs);
allFolders = builtins.attrValues config.frogeye.folders;
folders = builtins.filter (folder: folder.xdgUserDirVariable != null && folder.user == config.home.username) allFolders;
in
{
enable = true;
createDirectories = true;
extraConfig = builtins.listToAttrs (builtins.map
(folder: {
name = folder.xdgUserDirVariable;
value = "${config.home.homeDirectory}/${folder.path}";
})
folders);
} // wellKnownUserDirsNulled; # Don't use defaults dirs
};
services = {
blueman-applet.enable = true;

View file

@ -131,11 +131,6 @@ class PeriodicUpdater(Updater):
class InotifyUpdaterEventHandler(pyinotify.ProcessEvent):
def process_default(self, event: pyinotify.Event) -> None:
# DEBUG
# from pprint import pprint
# pprint(event.__dict__)
# return
assert event.path in InotifyUpdater.paths
if 0 in InotifyUpdater.paths[event.path]:

View file

@ -20,6 +20,7 @@
extraConfig = ''
restore_paused "yes"
'';
musicDirectory = "${config.home.homeDirectory}/Musiques";
};
xdg = {
configFile = {
@ -36,7 +37,6 @@
'';
};
};
userDirs.music = "${config.home.homeDirectory}/Musiques";
};
xsession.windowManager.i3.config.keybindings =
{