mirror of
https://github.com/kmein/niveum
synced 2026-03-26 06:11:07 +01:00
Compare commits
4 Commits
f5da2dffd8
...
51afd41254
| Author | SHA1 | Date | |
|---|---|---|---|
| 51afd41254 | |||
| eb4fa1b9bd | |||
| ac7a4b2aa5 | |||
| 89a4b13b2d |
@@ -15,14 +15,6 @@ in {
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = map tmpfilesConfig [
|
||||
{
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
group = "users";
|
||||
mode = "0755";
|
||||
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
|
||||
path = "${config.users.users.me.home}/notes";
|
||||
}
|
||||
{
|
||||
type = "L+";
|
||||
user = config.users.users.me.name;
|
||||
@@ -42,9 +34,9 @@ in {
|
||||
];
|
||||
|
||||
home-manager.users.me = {
|
||||
services.gnome-keyring.enable = true;
|
||||
services.gnome-keyring.enable = false;
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
startInBackground = true;
|
||||
};
|
||||
systemd.user.services.nextcloud-client = {
|
||||
@@ -55,6 +47,28 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.nextcloud-syncer = {
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = ["default.target"];
|
||||
startAt = "*:00/10";
|
||||
script = let
|
||||
kieran = {
|
||||
user = "kieran";
|
||||
password = lib.fileContents <secrets/nextcloud/password>;
|
||||
endpoint = "https://cloud.xn--kiern-0qa.de";
|
||||
};
|
||||
in ''
|
||||
KIERAN_TARGET=${config.users.users.me.home}/notes
|
||||
mkdir -p "$KIERAN_TARGET"
|
||||
${pkgs.nextcloud-client}/bin/nextcloudcmd --user ${kieran.user} --password ${lib.escapeShellArg kieran.password} --path /Notes "$KIERAN_TARGET" ${kieran.endpoint}
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "book" ''
|
||||
set -efu
|
||||
|
||||
@@ -243,7 +243,7 @@ in {
|
||||
note_file=$({
|
||||
echo diary/$(date -I).md
|
||||
echo diary/$(date -I -d yesterday).md
|
||||
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2
|
||||
find . -type f -printf "%T@ %p\n" | sort --reverse --numeric-sort | cut --delimiter=" " --fields=2-
|
||||
} | rofi -dmenu -i -p 'notes')
|
||||
if test "$note_file"
|
||||
then
|
||||
|
||||
@@ -96,7 +96,7 @@ in {
|
||||
file # determine file type
|
||||
dos2unix
|
||||
genpass # generate passwords
|
||||
ncdu # ncurses disk usage
|
||||
gdu # ncurses disk usage (ncdu is broken)
|
||||
rmlint # remove duplicate files
|
||||
python3Packages.jsonschema # json validation
|
||||
jq # json toolkit
|
||||
|
||||
Reference in New Issue
Block a user