home-mgr syncthin
This commit is contained in:
parent
072bdf5c57
commit
b1003f722f
3 changed files with 62 additions and 58 deletions
|
|
@ -84,60 +84,6 @@
|
|||
# enableExtensionPack = true;
|
||||
# };
|
||||
|
||||
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
||||
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
||||
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "tao";
|
||||
dataDir = "/home/tao/sync";
|
||||
configDir = "/home/tao/.config/syncthing";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
openDefaultPorts = true;
|
||||
settings = {
|
||||
devices = {
|
||||
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
|
||||
# bootstrap by commenting out devices first and rebuild switch impurely
|
||||
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
|
||||
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
|
||||
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
|
||||
};
|
||||
folders = let
|
||||
devs = [
|
||||
"nocomputer"
|
||||
"nolaptop"
|
||||
"uwuraid"
|
||||
];
|
||||
in {
|
||||
# "documents" = {
|
||||
# path = "/home/tao/documents";
|
||||
# devices = devs;
|
||||
# };
|
||||
"pictures" = {
|
||||
path = "/home/tao/pictures";
|
||||
devices = devs;
|
||||
};
|
||||
"projects" = {
|
||||
path = "/home/tao/projects";
|
||||
devices = devs;
|
||||
};
|
||||
"school" = {
|
||||
path = "/home/tao/school";
|
||||
devices = devs;
|
||||
};
|
||||
"sync" = {
|
||||
path = "/home/tao/sync";
|
||||
devices = devs;
|
||||
};
|
||||
# "work" = {
|
||||
# path = "/home/tao/work";
|
||||
# devices = devs;
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# nixpkgs.overlays = [
|
||||
# (final: prev: {
|
||||
# options.services.snapper.configs = prev.options.services.snapper.configs.overrideAttrs (old: {
|
||||
|
|
@ -191,17 +137,20 @@
|
|||
|
||||
documentation.enable = true;
|
||||
|
||||
age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
|
||||
# age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
|
||||
users.users.tao = {
|
||||
isNormalUser = true;
|
||||
hashedPasswordFile = config.age.secrets.password-tao.path;
|
||||
# hashedPasswordFile = config.age.secrets.password-tao.path;
|
||||
extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
|
||||
shell = pkgs.nushell;
|
||||
};
|
||||
|
||||
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
||||
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
||||
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.verbose = true;
|
||||
home-manager.backupFileExtension = ".hm-bak";
|
||||
home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib;};
|
||||
home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib config;};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue