From 4c752c188988adde619fe1e66229a2a48d844116 Mon Sep 17 00:00:00 2001 From: serenity-F Date: Wed, 31 Dec 2025 01:34:38 +1000 Subject: [PATCH] tidying --- core/sync.nix | 72 +++++++++++++-------------- home/programs/sync/default.nix | 6 +-- home/programs/sync/postActivation.nix | 8 +-- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/core/sync.nix b/core/sync.nix index 7650a48..e7f2315 100755 --- a/core/sync.nix +++ b/core/sync.nix @@ -1,6 +1,6 @@ # https://github.com/gitwatch/gitwatch # https://nixos.wiki/wiki/Syncthing -{ pkgs, primaryUser, homeDir, ... }: +{ pkgs, user, homeDirectory, ... }: { @@ -15,47 +15,47 @@ services = { ## Gitwatch - gitwatch = { + #gitwatch = { - Keyring = { # keyring backup, dont have a nextcloud (yet) - enable = true; - user = "${primaryUser}"; - path = "${homeDir}/Keyring/"; - remote = "git@codeberg.org:serenity-F/keyring.git"; - }; + #Keyring = { # keyring backup, dont have a nextcloud (yet) + #enable = true; + #user = "${user}"; + #path = "${homeDirectory}/Keyring/"; + #remote = "git@codeberg.org:serenity-F/keyring.git"; + #}; - Notes = { # notes backup, not paying for obsidian backup (lol) - enable = true; - user = "${primaryUser}"; - path = "${homeDir}/Notes/"; - remote = "git@codeberg.org:serenity-F/notes.git"; - }; - }; + #Notes = { # notes backup, not paying for obsidian backup (lol) + #enable = true; + #user = "${user}"; + #path = "${homeDirectory}/Notes/"; + #remote = "git@codeberg.org:serenity-F/notes.git"; + #}; + #}; ## Syncthing syncthing = { enable = false; # easy toggle - dataDir = "${homeDir}"; # defaults to primaryUser's homedir + dataDir = "${homeDirectory}"; # defaults to primaryUser's homedir openDefaultPorts = true; # opens the default firewall ports - #configDir = "${homeDir}/.config/syncthing"; # defaults to primaryUser's homedir - user = "${primaryUser}"; # uses primaryUser to run the service + #configDir = "${homeDirectory}/.config/syncthing"; # defaults to primaryUser's homedir + user = "${user}"; # uses primaryUser to run the service group = "users"; # runs in the users group ## For some reason is using `localhost:8384` #guiAddress = "home.syncthing:8384"; # default web address for the GUI - settings = { + #settings = { ## WebApp GUI #user = "serenity"; #password = "password"; ## Syncthing Folders - overrideFolders = true; # force these folder on activation - folders = { + #overrideFolders = true; # force these folder on activation + #folders = { - "Keyring" = { # folder for password/secrets vault - enable = true; # easy toggle - OFF for now - id = "k158k-hvzk3"; - path = "${homeDir}/Keyring"; # defaults to primaryUser's homedir - devices = [ + #"Keyring" = { # folder for password/secrets vault + #enable = true; # easy toggle - OFF for now + #id = "k158k-hvzk3"; + #path = "${homeDirectory}/Keyring"; # defaults to primaryUser's homedir + #devices = [ #"Hecate" #"Persephone" ]; @@ -64,24 +64,24 @@ #type = "simple"; # nothing fancy, keeps x number of copies #params = { keep = "3"; }; # number of copies to keep #}; - }; + #}; - "Notes" = { # folder for organisation/notes vault - enable = true; # easy toggle - id = "h0ay3-l8snk"; - path = "${homeDir}/Notes"; # defaults to primaryUser's homedir - devices = [ + #"Notes" = { # folder for organisation/notes vault + #enable = true; # easy toggle + #id = "h0ay3-l8snk"; + #path = "${homeDirectory}/Notes"; # defaults to primaryUser's homedir + #devices = [ #"Hecate" #"Persephone" - ]; + #]; #versioning = { # versioning, for added redundancy # disabled for now as we have versioning through git #type = "simple"; # nothing fancy, keeps x number of copies #params = { keep = "3"; }; # number of copies to keep #}; - }; + #}; - }; + #}; ## Syncthing Devices #overrideDevices = true; # force these devices on activation @@ -93,7 +93,7 @@ #"36WUSM4-HFYOGWP-33JHBPI-WR2TXXE-ZX3PFMB-QH6BMXM-DQ523ZF-FD7M3AI"; #"Persephone".id = "REALLY-LONG-PERSEPHONE-SYNCTHING-KEY-HERE"; # disabled for testing #}; - }; + #}; }; }; diff --git a/home/programs/sync/default.nix b/home/programs/sync/default.nix index a0ed187..68f1d2f 100755 --- a/home/programs/sync/default.nix +++ b/home/programs/sync/default.nix @@ -2,7 +2,7 @@ ## https://nix-community.github.io/home-manager/options.xhtml#opt-home.file ## https://nix-community.github.io/home-manager/options.xhtml#opt-home.activation -{ inputs, outputs, pkgs, config, flakePath, disksPath, primaryUser, ... }: +{ inputs, outputs, pkgs, config, flakePath, disksPath, user, ... }: { @@ -18,7 +18,7 @@ #''; ## Mounts Asphodel to typical media location - #fileSystems."/run/media/${primaryUser}/Asphodel".device = + #fileSystems."/run/media/${user}/Asphodel".device = #"/dev/mapper/Asphodel"; #home.file = { # Files and directories to copy to ${homeDir} @@ -26,7 +26,7 @@ ## Example format for home.file #"Foo" = { # Name for the copied file #source = ./Foo; # Source is relative to this file - #target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDir} + #target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDirectory} #recursive = true; # Unsure if necessary for most things #}; diff --git a/home/programs/sync/postActivation.nix b/home/programs/sync/postActivation.nix index 9496095..ae46fe7 100644 --- a/home/programs/sync/postActivation.nix +++ b/home/programs/sync/postActivation.nix @@ -1,4 +1,4 @@ -{ inputs, outputs, lib, config, pkgs, primaryUser, homeDir, flakePath, disksPath +{ inputs, outputs, lib, config, pkgs, user, homeDirectory, flakePath, disksPath , ... }: { @@ -17,10 +17,10 @@ supportsDryActivation = false; ## Prints status of run commmand with a cute message if successful text = '' - cd ~ && ln -s Disks /run/media/${primaryUser}/* + cd ~ && ln -s Disks /run/media/${user}/* echo "Current variables required are:" - echo "primaryUser - ${primaryUser}" - echo "homeDir - ${homeDir}" + echo "primaryUser - ${user}" + echo "homeDir - ${homeDirectory}" echo "current paths linked are:" echo "flakePath - ${flakePath}" echo "disksPath - ${disksPath}"