This commit is contained in:
serenity-F 2025-12-31 01:34:38 +10:00
parent 4049c17abd
commit 4c752c1889
3 changed files with 43 additions and 43 deletions

View file

@ -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
#};
};
#};
};
};

View file

@ -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
#};

View file

@ -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}"