diff --git a/hosts/tkaronto/default.nix b/hosts/tkaronto/default.nix index 715c86f..93594c8 100644 --- a/hosts/tkaronto/default.nix +++ b/hosts/tkaronto/default.nix @@ -18,6 +18,7 @@ ../../modules/persist ../../modules/gamemode ../../modules/network/iwd.nix + ../../modules/syncthing ../../users/root ../../users/patriot ] diff --git a/modules/syncthing/default.nix b/modules/syncthing/default.nix new file mode 100644 index 0000000..48a5186 --- /dev/null +++ b/modules/syncthing/default.nix @@ -0,0 +1,12 @@ +{config, inputs, ...}: { + users.users.syncthing.extraGroups = ["users"]; + services.syncthing = { + enable = true; + devices.redmi-phone = { + id = builtins.readFile "${inputs.self}/secrets/redmi-phone.syncthing.id"; + introducer = true; + autoAcceptFolders = true; + }; + dataDir = "${config.system.persistDir}/syncthing"; + }; +} diff --git a/secrets/redmi-phone.syncthing.id b/secrets/redmi-phone.syncthing.id new file mode 100644 index 0000000..b54494a Binary files /dev/null and b/secrets/redmi-phone.syncthing.id differ diff --git a/users/modules/obsidian/default.nix b/users/modules/obsidian/default.nix new file mode 100644 index 0000000..23f0aeb --- /dev/null +++ b/users/modules/obsidian/default.nix @@ -0,0 +1,4 @@ +{pkgs, config, lib, ...}: { + home.packages = [pkgs.obsidian]; + home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".config/obsidian"]; +} diff --git a/users/patriot/default.nix b/users/patriot/default.nix index 2fad528..1efac60 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -63,6 +63,14 @@ in { isSystem = false; }; }; + syncthing.folders = { + notes = { + enable = true; + path = "${config.users.users.patriot.home}/notes"; + devices = ["redmi-phone"]; + ignorePerms = true; + }; + }; }; # gnome keyring better fr fr security.pam.services.patriot = { @@ -93,7 +101,7 @@ in { # cli stuff ["zoxide" "zsh" "fzf" "starship" "direnv"] # dev stuff - ["helix" "git" "ssh"] + ["helix" "git" "ssh" "obsidian"] ]; in l.flatten [ @@ -119,6 +127,7 @@ in { # caches / history stuff ".directory_history" ".cache" + "notes" ] ++ mkPaths ".local/share" [ "direnv" @@ -172,7 +181,6 @@ in { cloudflared lutris protontricks - obsidian ]; }; programs = {