mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
Compare commits
5 Commits
4871d8d0d8
...
2e13dfe565
| Author | SHA1 | Date | |
|---|---|---|---|
| 2e13dfe565 | |||
| edf26867b1 | |||
| ad1d36cd0b | |||
| d51ffe9735 | |||
| 527439cf9d |
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
|
||||
"obsidian"
|
||||
"zoom"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user