From 8d4176f4e6703610c6a9d7ae8696c84a70517e02 Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Mon, 15 Aug 2022 03:49:56 +0300 Subject: [PATCH] l --- hosts/tkaronto/default.nix | 1 + modules/syncthing/default.nix | 12 ++++++++++++ secrets/redmi-phone.syncthing.id | Bin 0 -> 85 bytes users/modules/obsidian/default.nix | 4 ++++ users/patriot/default.nix | 12 ++++++++++-- 5 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 modules/syncthing/default.nix create mode 100644 secrets/redmi-phone.syncthing.id create mode 100644 users/modules/obsidian/default.nix 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 0000000000000000000000000000000000000000..b54494ac76b4ee320d2e1626421834b8cb637a34 GIT binary patch literal 85 zcmV-b0IL50M@dveQdv+`0Nod82R-4+OiaER^qjihf34k6OBHz?0I8gbW1~pO_+S=c4|A48K4&O- literal 0 HcmV?d00001 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 = {