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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue