mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:53:55 -05:00
nixos/syncthing: integrate cfg one file
This commit is contained in:
parent
41852c9d1f
commit
08f91eaad6
|
@ -4,8 +4,6 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [./syncMusic.nix];
|
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
cfg = config.ar.services.syncthing;
|
cfg = config.ar.services.syncthing;
|
||||||
in
|
in
|
||||||
|
@ -30,6 +28,7 @@
|
||||||
relaysEnabled = true;
|
relaysEnabled = true;
|
||||||
urAccepted = -1;
|
urAccepted = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
devices = {
|
devices = {
|
||||||
"brawly" = {id = "BBIBWMR-CN4CFC4-2XMPLII-XFWXBT5-EPCZCAF-JOWAX5J-DHIGNM4-O3XQ4Q3";}; # Pixel 6a
|
"brawly" = {id = "BBIBWMR-CN4CFC4-2XMPLII-XFWXBT5-EPCZCAF-JOWAX5J-DHIGNM4-O3XQ4Q3";}; # Pixel 6a
|
||||||
"fallarbor" = {id = "P4URLH4-YWLMO6J-W62ET7H-TQAO3Y6-T2FAYOY-C2VTI65-VQXHVGG-NQ76PAZ";}; # Framework 13 Intel 11th gen
|
"fallarbor" = {id = "P4URLH4-YWLMO6J-W62ET7H-TQAO3Y6-T2FAYOY-C2VTI65-VQXHVGG-NQ76PAZ";}; # Framework 13 Intel 11th gen
|
||||||
|
@ -43,7 +42,9 @@
|
||||||
"wallace" = {id = "X55NQL2-H3TEJ5U-EXZPBKQ-LI6BMB4-W2ULDIJ-YNIHJHB-4ISCOJB-UHNLYAX";}; # Samsung a35
|
"wallace" = {id = "X55NQL2-H3TEJ5U-EXZPBKQ-LI6BMB4-W2ULDIJ-YNIHJHB-4ISCOJB-UHNLYAX";}; # Samsung a35
|
||||||
"winona" = {id = "IGAW5SS-WY2QN6J-5TF74YZ-6XPNPTC-RCH3HIT-ZZQKCAI-6L54IS2-SNRIMA2";}; # Pixel Tablet
|
"winona" = {id = "IGAW5SS-WY2QN6J-5TF74YZ-6XPNPTC-RCH3HIT-ZZQKCAI-6L54IS2-SNRIMA2";}; # Pixel Tablet
|
||||||
};
|
};
|
||||||
folders = {
|
|
||||||
|
folders =
|
||||||
|
{
|
||||||
"sync" = {
|
"sync" = {
|
||||||
id = "default";
|
id = "default";
|
||||||
path = "/home/${cfg.user}/sync";
|
path = "/home/${cfg.user}/sync";
|
||||||
|
@ -56,6 +57,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"camera" = {
|
"camera" = {
|
||||||
id = "fcsgh-dlxys";
|
id = "fcsgh-dlxys";
|
||||||
path = "/home/${cfg.user}/pics/camera";
|
path = "/home/${cfg.user}/pics/camera";
|
||||||
|
@ -65,6 +67,7 @@
|
||||||
type = "trashcan";
|
type = "trashcan";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"screenshots" = {
|
"screenshots" = {
|
||||||
id = "screenshots";
|
id = "screenshots";
|
||||||
path = "/home/${cfg.user}/pics/screenshots";
|
path = "/home/${cfg.user}/pics/screenshots";
|
||||||
|
@ -74,6 +77,13 @@
|
||||||
type = "trashcan";
|
type = "trashcan";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
// lib.attrsets.optionalAttrs (config.ar.services.syncthing.syncMusic) {
|
||||||
|
"music" = {
|
||||||
|
id = "6nzmu-z9der";
|
||||||
|
path = config.ar.services.syncthing.musicPath;
|
||||||
|
devices = ["lavaridge" "mauville" "petalburg" "rustboro" "wallace"];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.ar.services.syncthing.syncMusic {
|
|
||||||
services.syncthing = {
|
|
||||||
settings = {
|
|
||||||
folders = {
|
|
||||||
"music" = {
|
|
||||||
id = "6nzmu-z9der";
|
|
||||||
path = config.ar.services.syncthing.musicPath;
|
|
||||||
devices = ["lavaridge" "mauville" "petalburg" "rustboro" "wallace"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue