1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 20:31:07 +01:00

5 Commits

4 changed files with 20 additions and 8 deletions

View File

@@ -4,7 +4,18 @@
...
}: let
inherit (import ../lib) defaultApplications theme;
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
in {
environment.systemPackages = [
(pkgs.writers.writeDashBin "notifications" ''
${pkgs.dunst}/bin/dunstctl history \
| ${pkgs.jq}/bin/jq -r '
.data[]
| map("${sgr "90" ''\(.appname.data)''} ${sgr "1" ''\(.summary.data)''} ${sgr "31" ''\(.body.data | gsub("\n"; " | "))''}")
| join("\n")'
'')
];
home-manager.users.me.services.dunst = {
enable = true;
iconTheme = (theme pkgs).icon;

View File

@@ -106,7 +106,7 @@ in {
obsidian
anki-bin # flashcards
jbofihe # lojbanic software
zoom-us # video conferencing
unstablePackages.zoom-us # video conferencing
alejandra # nix formatter
pdfgrep # search in pdf
pdftk # pdf toolkit

View File

@@ -174,6 +174,7 @@
config.allowUnfreePredicate = pkg:
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
"obsidian"
"zoom"
];
};

View File

@@ -109,7 +109,7 @@
User = "panoptikon";
Group = "panoptikon";
WorkingDirectory = "/var/lib/panoptikon";
RestartSec = "60";
RestartSec = toString (60 * 60);
Restart = "on-failure";
LoadCredential = watcherOptions.loadCredential;
};
@@ -124,16 +124,16 @@
${watcherOptions.script} > ${watcherName}
if [ -n "$(${pkgs.git}/bin/git diff -- ${watcherName})" ]; then
diff_output=$(${pkgs.diffutils}/bin/diff --new-file ${watcherName}.old ${watcherName})
if [ -n "$diff_output" ]; then
${lib.strings.concatMapStringsSep "\n" (reporter: ''
${pkgs.git}/bin/git diff HEAD^ -- ${watcherName} | ${reporter}
'')
watcherOptions.reporters}
echo "$diff_output" | ${reporter}
'') watcherOptions.reporters}
:
fi
${pkgs.git}/bin/git add ${watcherName}
${pkgs.git}/bin/git commit --message "${watcherName} / $(${pkgs.coreutils}/bin/date -Is)" || :
mv ${watcherName} ${watcherName}.old
'';
})
cfg.watchers;