1
0
mirror of https://github.com/kmein/niveum synced 2026-03-30 01:01:10 +02:00

5 Commits

4 changed files with 20 additions and 8 deletions

View File

@@ -4,7 +4,18 @@
... ...
}: let }: let
inherit (import ../lib) defaultApplications theme; inherit (import ../lib) defaultApplications theme;
sgr = code: string: ''\u001b[${code}m${string}\u001b[0m'';
in { 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 = { home-manager.users.me.services.dunst = {
enable = true; enable = true;
iconTheme = (theme pkgs).icon; iconTheme = (theme pkgs).icon;

View File

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

View File

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

View File

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