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:
parent
b7d56a3118
commit
8edb670486
20 changed files with 222 additions and 45 deletions
|
@ -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;
|
||||
|
|
|
@ -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]:
|
||||
|
|
|
@ -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 =
|
||||
{
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
] ++ lib.optionals config.frogeye.desktop.xorg [
|
||||
# Common
|
||||
zeal-qt6 # Offline documentation
|
||||
sqlitebrowser
|
||||
|
||||
# Network
|
||||
wireshark-qt
|
||||
|
|
|
@ -61,8 +61,5 @@
|
|||
# https://hydra.nixos.org/job/nixos/release-23.11/nixpkgs.blender.aarch64-linux
|
||||
blender
|
||||
]);
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue