mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
Compare commits
6 Commits
3216cd19f5
...
update_fla
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a36c29a679 | ||
| 314848d877 | |||
| 377b338979 | |||
| 26231912cf | |||
| a5532f1e9d | |||
| d878b73ab5 |
@@ -265,9 +265,9 @@ in
|
||||
exec-once = [
|
||||
(lib.getExe pkgs.ashell)
|
||||
"hyprctl dispatch exec \"[workspace special:${language.obsidian} silent] obsidian\""
|
||||
"${lib.getExe' pkgs.wl-clipboard "wl-paste"} -t text --watch ${lib.getExe pkgs.clipman} store"
|
||||
(lib.getExe pkgs.hyprsunset)
|
||||
(lib.getExe pkgs.hyprpaper)
|
||||
(lib.getExe pkgs.niphas-clipboard-watcher)
|
||||
(lib.getExe pkgs.niphas-redshift)
|
||||
(lib.getExe pkgs.niphas-set-wallpaper)
|
||||
];
|
||||
|
||||
device = [
|
||||
@@ -341,7 +341,7 @@ in
|
||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-"
|
||||
", Print, exec, ${lib.getExe pkgs.niphas-screenshot} -m region --clipboard-only"
|
||||
", Print, exec, ${lib.getExe pkgs.niphas-screenshot}"
|
||||
];
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
@@ -355,7 +355,7 @@ in
|
||||
"${mod} SHIFT, R, exit,"
|
||||
"${mod}, t, exec, ${lib.getExe pkgs.niphas-file-browser}"
|
||||
"${mod}, Y, exec, ${lib.getExe pkgs.niphas-web-browser}"
|
||||
"${mod}, Q, exec, ${lib.getExe pkgs.clipman} pick --tool=rofi"
|
||||
"${mod}, Q, exec, ${lib.getExe pkgs.niphas-clipman}"
|
||||
"${mod}, u, exec, ${lib.getExe pkgs.unicodmenu}"
|
||||
"${mod}, p, exec, ${lib.getExe pkgs.rofi-pass-wayland}"
|
||||
"${mod} SHIFT, Z, togglefloating,"
|
||||
|
||||
151
flake.lock
generated
151
flake.lock
generated
@@ -12,11 +12,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762618334,
|
||||
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
||||
"lastModified": 1770165109,
|
||||
"narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
|
||||
"rev": "b027ee29d959fda4b60b57566d64c98a202e0feb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -122,11 +122,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769353768,
|
||||
"narHash": "sha256-zI+7cbMI4wMIR57jMjDSEsVb3grapTnURDxxJPYFIW0=",
|
||||
"lastModified": 1771437256,
|
||||
"narHash": "sha256-bLqwib+rtyBRRVBWhMuBXPCL/OThfokA+j6+uH7jDGU=",
|
||||
"owner": "numtide",
|
||||
"repo": "blueprint",
|
||||
"rev": "c7da5c70ad1c9b60b6f5d4f674fbe205d48d8f6c",
|
||||
"rev": "06ee7190dc2620ea98af9eb225aa9627b68b0e33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -189,11 +189,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769842381,
|
||||
"narHash": "sha256-0dPzo1ElvAIZ0RwEwx5FfqAUiFj22K9QJOU9stiMCrw=",
|
||||
"lastModified": 1772261909,
|
||||
"narHash": "sha256-8XbJXrhMFhLgoBrjFIJx5XJi+SD+7/gbvaIXCuqy9Z0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "b2344f384a82db1410ab09769eb8c4a820de667f",
|
||||
"rev": "e4c413b9546d6c9e6426b33b4d6de1a49a375024",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -384,11 +384,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769580047,
|
||||
"narHash": "sha256-tNqCP/+2+peAXXQ2V8RwsBkenlfWMERb+Uy6xmevyhM=",
|
||||
"lastModified": 1772302941,
|
||||
"narHash": "sha256-TL3+ckbOTILXrR0qSK3dJj2BJ0S5yz/YSsUF1oEgd9g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "366d78c2856de6ab3411c15c1cb4fb4c2bf5c826",
|
||||
"rev": "9b9142b5fe214c2adabe86257c33e022372b7c96",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -405,11 +405,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771167156,
|
||||
"narHash": "sha256-hvlg7rTzAmfX2HW0GgrVGvbXoNioTK0bidbRv42QEhY=",
|
||||
"lastModified": 1772328903,
|
||||
"narHash": "sha256-1f5WHVW5jwO0TEBZNIK3GkgkwTqBaUFrNCf0WQ4/sM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "llm-agents.nix",
|
||||
"rev": "bbd22c02ac546b7ba07147eb14194128b44ff209",
|
||||
"rev": "45656c46d998310ea6306a0036d581bf77091213",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -496,11 +496,11 @@
|
||||
"wrappers": "wrappers"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770756688,
|
||||
"narHash": "sha256-raCwOTt5xT7J1ysxdGrmBva6OVrvjf47EgVLi5B5R5o=",
|
||||
"lastModified": 1771601908,
|
||||
"narHash": "sha256-lqscsSHms5xk8iOOEj0J6XtrIcZp7/TXN4iiQjNeXzM=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "86bf2150a7cabd225149f35c0ff57576af6ded44",
|
||||
"revCount": 38,
|
||||
"rev": "13ee868d5d297fbcfa1370cfff67e5c7f5e3d0aa",
|
||||
"revCount": 42,
|
||||
"type": "git",
|
||||
"url": "https://code.kmein.de/kfm/niphas"
|
||||
},
|
||||
@@ -516,11 +516,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765267181,
|
||||
"narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=",
|
||||
"lastModified": 1771734689,
|
||||
"narHash": "sha256-/phvMgr1yutyAMjKnZlxkVplzxHiz60i4rc+gKzpwhg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f",
|
||||
"rev": "8f590b832326ab9699444f3a48240595954a4b10",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -537,11 +537,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769018862,
|
||||
"narHash": "sha256-x3eMpPQhZwEDunyaUos084Hx41XwYTi2uHY4Yc4YNlk=",
|
||||
"lastModified": 1771963727,
|
||||
"narHash": "sha256-gFyFAFYYoNsvd6heI0XtDMIa4pnykjwDljS7dQm45uE=",
|
||||
"owner": "oddlama",
|
||||
"repo": "nix-topology",
|
||||
"rev": "a15cac71d3399a4c2d1a3482ae62040a3a0aa07f",
|
||||
"rev": "b493b9b970388d79129ce1a92a6b060c9305386f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -574,11 +574,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1769302137,
|
||||
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=",
|
||||
"lastModified": 1771969195,
|
||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8",
|
||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -589,11 +589,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1770843696,
|
||||
"narHash": "sha256-LovWTGDwXhkfCOmbgLVA10bvsi/P8eDDpRudgk68HA8=",
|
||||
"lastModified": 1771423170,
|
||||
"narHash": "sha256-K7Dg9TQ0mOcAtWTO/FX/FaprtWQ8BmEXTpLIaNRhEwU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2343bbb58f99267223bc2aac4fc9ea301a155a16",
|
||||
"rev": "bcc4a9d9533c033d806a46b37dc444f9b0da49dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -636,11 +636,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1770197578,
|
||||
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
|
||||
"lastModified": 1772198003,
|
||||
"narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
|
||||
"rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -652,11 +652,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1769598131,
|
||||
"narHash": "sha256-e7VO/kGLgRMbWtpBqdWl0uFg8Y2XWFMdz0uUJvlML8o=",
|
||||
"lastModified": 1772047000,
|
||||
"narHash": "sha256-7DaQVv4R97cii/Qdfy4tmDZMB2xxtyIvNGSwXBBhSmo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fa83fd837f3098e3e678e6cf017b2b36102c7211",
|
||||
"rev": "1267bb4920d0fc06ea916734c11b0bf004bbe17e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -666,6 +666,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1771369470,
|
||||
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
@@ -674,11 +690,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769867112,
|
||||
"narHash": "sha256-n3YYhO6VpGadtVOiL/eAxnm9JBC6GfXsJfj8O6V/JvU=",
|
||||
"lastModified": 1772326810,
|
||||
"narHash": "sha256-lqwxrCp2ZgAjlYRKbT+bkvXmxZSibCyB3ee96HwLV34=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "c74b53b75a4219cdecea1194a95e36a222981860",
|
||||
"rev": "7bf299ddf8a26872aa45acc49a4424bd17237072",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -722,11 +738,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771337567,
|
||||
"narHash": "sha256-DiH3hGzC7z6qv39zuFCrMrKDTKdtsN+z/OorsbBdJaQ=",
|
||||
"lastModified": 1772243521,
|
||||
"narHash": "sha256-Fi0zLX0hGm2eAQJ0d0FTb2y+KuCcM8zjkzkEyZB4fUI=",
|
||||
"owner": "pinpox",
|
||||
"repo": "opencrow",
|
||||
"rev": "8da71c7d1d04e27ffb5aade99f67e591d52c30c4",
|
||||
"rev": "bb555b7796ec1842e0295462736ee7a956abc676",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -735,6 +751,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"panoptikon": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771688635,
|
||||
"narHash": "sha256-tKmjgdeoQV5W96Chr2B5WOFXC70FvcfxhNCmBT1YZUY=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "30e15d8f95693ba82d2d93ef9acbc1ceb65ef430",
|
||||
"revCount": 4,
|
||||
"type": "git",
|
||||
"url": "https://code.kmein.de/kfm/panoptikon"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://code.kmein.de/kfm/panoptikon"
|
||||
}
|
||||
},
|
||||
"retiolum": {
|
||||
"locked": {
|
||||
"lastModified": 1756302470,
|
||||
@@ -769,6 +803,7 @@
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"nur": "nur",
|
||||
"opencrow": "opencrow",
|
||||
"panoptikon": "panoptikon",
|
||||
"retiolum": "retiolum",
|
||||
"scripts": "scripts",
|
||||
"stockholm": "stockholm",
|
||||
@@ -784,11 +819,11 @@
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1769786006,
|
||||
"narHash": "sha256-ax6cH54Nc20QuxlHNC8RMt1P8quMECY4gaACFAdd5ec=",
|
||||
"lastModified": 1772178959,
|
||||
"narHash": "sha256-DkjUvrEnnhHjOcjMx6aXfYGIZ0PWmcYzvVayhRj1r4M=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "eb0588812b041ebbf2645555f2a4df3bcd853c6d",
|
||||
"rev": "8494a8b3b769c17e8594d811012cc1b0fab090c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -833,11 +868,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769038106,
|
||||
"narHash": "sha256-k558r83lvHbqDlEFEf3zCX1/WuMNgnp1bjMbwMhg5wM=",
|
||||
"lastModified": 1771846963,
|
||||
"narHash": "sha256-1srlGKTtf0a2nfH78MohqNtkcvLSuEIEVccPD4WJCZk=",
|
||||
"owner": "krebs",
|
||||
"repo": "stockholm",
|
||||
"rev": "0122ded2137e568e771e753c0c3a17b1b20d9ca7",
|
||||
"rev": "bab362d0f6fcde28ac41716ca15cc552d4659ec5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -867,11 +902,11 @@
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769829895,
|
||||
"narHash": "sha256-J2jDCqzdtUxKVstC/zwy4TaSYgUxyzInGZ1qU7W2LaE=",
|
||||
"lastModified": 1771788390,
|
||||
"narHash": "sha256-RzBpBwn93GWxLjacTte+ngwwg0L/BVOg4G/sSIeK3Rw=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "413e927522d65ca8a37b283f4e88ada4865971dd",
|
||||
"rev": "ebb238f14d6f930068be4718472da3105fd5d3bf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1124,11 +1159,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769691507,
|
||||
"narHash": "sha256-8aAYwyVzSSwIhP2glDhw/G0i5+wOrren3v6WmxkVonM=",
|
||||
"lastModified": 1770228511,
|
||||
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "28b19c5844cc6e2257801d43f2772a4b4c050a1b",
|
||||
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1201,11 +1236,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770311206,
|
||||
"narHash": "sha256-gzTvuaJZaymgxQC4rOZ9HlMRRWHVF2moEEaTnCG556A=",
|
||||
"lastModified": 1772137435,
|
||||
"narHash": "sha256-dqkfxxpIiIs4wdWhT4lfQi1lfA0CgIftPiYGvw0tUOk=",
|
||||
"owner": "lassulus",
|
||||
"repo": "wrappers",
|
||||
"rev": "241f2f7dfcac0dbb2338105bdba7f03f412c5847",
|
||||
"rev": "4e12f430ae705d9bbb591ca9c51cbccbee050a23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
10
flake.nix
10
flake.nix
@@ -12,6 +12,7 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
niphas.url = "git+https://code.kmein.de/kfm/niphas";
|
||||
panoptikon.url = "git+https://code.kmein.de/kfm/panoptikon";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
retiolum.url = "github:krebs/retiolum";
|
||||
@@ -90,6 +91,7 @@
|
||||
autorenkalender,
|
||||
telebots,
|
||||
stockholm,
|
||||
panoptikon,
|
||||
nix-index-database,
|
||||
stylix,
|
||||
voidrice,
|
||||
@@ -193,7 +195,6 @@
|
||||
nixosModules = {
|
||||
moodle-dl = import modules/moodle-dl.nix;
|
||||
passport = import modules/passport.nix;
|
||||
panoptikon = import modules/panoptikon.nix;
|
||||
power-action = import modules/power-action.nix;
|
||||
system-dependent = import modules/system-dependent.nix;
|
||||
telegram-bot = import modules/telegram-bot.nix;
|
||||
@@ -369,10 +370,6 @@
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
panoptikon = import lib/panoptikon.nix {
|
||||
inherit lib;
|
||||
pkgs = final;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -384,6 +381,7 @@
|
||||
nixpkgs.overlays = [
|
||||
self.overlays.default
|
||||
niphas.overlays.default
|
||||
panoptikon.overlays.default
|
||||
(final: prev: {
|
||||
niphas-git =
|
||||
(prev.niphas-git.passthru.configuration.apply {
|
||||
@@ -448,7 +446,7 @@
|
||||
++ profiles.server
|
||||
++ [
|
||||
systems/ful/configuration.nix
|
||||
self.nixosModules.panoptikon
|
||||
panoptikon.nixosModules.default
|
||||
self.nixosModules.go-webring
|
||||
stockholm.nixosModules.reaktor2
|
||||
opencrow.nixosModules.default
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# watcher scripts
|
||||
url =
|
||||
address:
|
||||
pkgs.writers.writeDash "watch-url" ''
|
||||
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} \
|
||||
| ${pkgs.python3Packages.html2text}/bin/html2text --decode-errors=ignore
|
||||
'';
|
||||
urlSelector =
|
||||
selector: address:
|
||||
pkgs.writers.writeDash "watch-url-selector" ''
|
||||
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} \
|
||||
| ${pkgs.htmlq}/bin/htmlq ${lib.escapeShellArg selector} \
|
||||
| ${pkgs.python3Packages.html2text}/bin/html2text
|
||||
'';
|
||||
urlJSON =
|
||||
{
|
||||
jqScript ? ".",
|
||||
}:
|
||||
address:
|
||||
pkgs.writers.writeDash "watch-url-json" ''
|
||||
${pkgs.curl}/bin/curl -sSL ${lib.escapeShellArg address} | ${pkgs.jq}/bin/jq -f ${pkgs.writeText "script.jq" jqScript}
|
||||
'';
|
||||
|
||||
# reporter scripts
|
||||
kpaste-irc =
|
||||
{
|
||||
target,
|
||||
retiolumLink ? false,
|
||||
server ? "irc.r",
|
||||
messagePrefix ? "change detected: ",
|
||||
nick ? ''"$PANOPTIKON_WATCHER"-watcher'',
|
||||
}:
|
||||
pkgs.writers.writeDash "kpaste-irc-reporter" ''
|
||||
KPASTE_CONTENT_TYPE=text/plain ${pkgs.kpaste}/bin/kpaste \
|
||||
| ${pkgs.gnused}/bin/sed -n "${if retiolumLink then "2" else "3"}s/^/${messagePrefix}/p" \
|
||||
| ${pkgs.nur.repos.mic92.ircsink}/bin/ircsink \
|
||||
--nick ${nick} \
|
||||
--server ${server} \
|
||||
--target ${target}
|
||||
'';
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.services.panoptikon = {
|
||||
enable = lib.mkEnableOption "Generic command output / website watcher";
|
||||
watchers = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (watcher: {
|
||||
options = {
|
||||
script = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
description = ''
|
||||
A script whose stdout is to be watched.
|
||||
'';
|
||||
example = ''
|
||||
pkgs.writers.writeDash "github-meta" '''
|
||||
''${pkgs.curl}/bin/curl -sSL https://api.github.com/meta | ''${pkgs.jq}/bin/jq
|
||||
'''
|
||||
'';
|
||||
};
|
||||
frequency = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = ''
|
||||
How often to run the script. See systemd.time(7) for more information about the format.
|
||||
'';
|
||||
example = "*:0/3";
|
||||
default = "daily";
|
||||
};
|
||||
loadCredential = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = ''
|
||||
This can be used to pass secrets to the systemd service without adding them to the nix store.
|
||||
'';
|
||||
default = [ ];
|
||||
};
|
||||
reporters = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
description = ''
|
||||
A list of scripts that take the diff (if any) via stdin and report it (e.g. to IRC, Telegram or Prometheus). The name of the watcher will be in the $PANOPTIKON_WATCHER environment variable.
|
||||
'';
|
||||
example = ''
|
||||
[
|
||||
(pkgs.writers.writeDash "telegram-reporter" '''
|
||||
''${pkgs.curl}/bin/curl -X POST https://api.telegram.org/bot''${TOKEN}/sendMessage \
|
||||
-d chat_id=123456 \
|
||||
-d text="$(cat)"
|
||||
''')
|
||||
(pkgs.writers.writeDash "notify" '''
|
||||
''${pkgs.libnotify}/bin/notify-send "$PANOPTIKON_WATCHER has changed."
|
||||
''')
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = { };
|
||||
})
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.services.panoptikon;
|
||||
in
|
||||
lib.mkIf cfg.enable {
|
||||
users.extraUsers.panoptikon = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = "/var/lib/panoptikon";
|
||||
group = "panoptikon";
|
||||
};
|
||||
|
||||
users.extraGroups.panoptikon = { };
|
||||
|
||||
systemd.timers = lib.attrsets.mapAttrs' (
|
||||
watcherName: _:
|
||||
lib.nameValuePair "panoptikon-${watcherName}" {
|
||||
timerConfig.RandomizedDelaySec = toString (60 * 60);
|
||||
}
|
||||
) cfg.watchers;
|
||||
|
||||
systemd.services = lib.attrsets.mapAttrs' (
|
||||
watcherName: watcherOptions:
|
||||
lib.nameValuePair "panoptikon-${watcherName}" {
|
||||
enable = true;
|
||||
startAt = watcherOptions.frequency;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "panoptikon";
|
||||
Group = "panoptikon";
|
||||
WorkingDirectory = "/var/lib/panoptikon";
|
||||
RestartSec = toString (60 * 60);
|
||||
Restart = "on-failure";
|
||||
LoadCredential = watcherOptions.loadCredential;
|
||||
};
|
||||
unitConfig = {
|
||||
StartLimitIntervalSec = "300";
|
||||
StartLimitBurst = "5";
|
||||
};
|
||||
environment.PANOPTIKON_WATCHER = watcherName;
|
||||
wants = [ "network-online.target" ];
|
||||
script = ''
|
||||
set -fux
|
||||
${watcherOptions.script} > ${lib.escapeShellArg watcherName}
|
||||
diff_output=$(${pkgs.diffutils}/bin/diff --new-file ${
|
||||
lib.escapeShellArg (watcherName + ".old")
|
||||
} ${lib.escapeShellArg watcherName} || :)
|
||||
if [ -n "$diff_output" ]
|
||||
then
|
||||
${lib.strings.concatMapStringsSep "\n" (
|
||||
reporter: ''echo "$diff_output" | ${reporter} || :''
|
||||
) watcherOptions.reporters}
|
||||
fi
|
||||
mv ${lib.escapeShellArg watcherName} ${lib.escapeShellArg (watcherName + ".old")}
|
||||
'';
|
||||
}
|
||||
) cfg.watchers;
|
||||
};
|
||||
}
|
||||
@@ -18,7 +18,7 @@ let
|
||||
];
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-ruCukrbH89/uZHhxYSmrcs5NUi2ZG8nuwTEuJKHP2rw=";
|
||||
outputHash = "sha256-YrrQ5m8XYKFNR2+dn97GYxKxcWPBndomPZsqKfwD6w0=";
|
||||
impureEnvVars = [
|
||||
"http_proxy"
|
||||
"https_proxy"
|
||||
|
||||
2
secrets
2
secrets
Submodule secrets updated: 94998bbbe0...4fa163a68e
@@ -48,8 +48,8 @@
|
||||
NIX_REMOTE = "daemon";
|
||||
|
||||
PI_PERMISSION_LEVEL = "high";
|
||||
OPENCROW_MATRIX_HOMESERVER = "https://matrix.4d2.org";
|
||||
OPENCROW_MATRIX_USER_ID = "@fable:4d2.org";
|
||||
OPENCROW_MATRIX_HOMESERVER = "https://matrix.org";
|
||||
OPENCROW_MATRIX_USER_ID = "@fable_ai:matrix.org";
|
||||
OPENCROW_SOUL_FILE = "/run/opencrow/SOUL.md";
|
||||
OPENCROW_HEARTBEAT_INTERVAL = "2h";
|
||||
|
||||
|
||||
@@ -5,42 +5,23 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
irc-xxx = pkgs.lib.panoptikon.kpaste-irc {
|
||||
irc-xxx = pkgs.panoptikonReporters.kpaste-irc {
|
||||
target = lib.escapeShellArg "#xxx";
|
||||
retiolumLink = true;
|
||||
};
|
||||
|
||||
matrix =
|
||||
{
|
||||
server ? "matrix.4d2.org",
|
||||
target,
|
||||
}:
|
||||
pkgs.writers.writeDash "matrix-reporter" ''
|
||||
export RAW_MESSAGE="$(cat)"
|
||||
export MESSAGE=$(printf '<b>%s</b><br><pre>%s</pre>' "$PANOPTIKON_WATCHER" "$RAW_MESSAGE")
|
||||
export MATRIX_TOKEN="$(cat ${config.age.secrets.matrix-token-lakai.path})"
|
||||
export JSON_PAYLOAD=$(${pkgs.jq}/bin/jq -n --arg msgtype "m.text" --arg body "$RAW_MESSAGE" --arg formattedBody "$MESSAGE" '{msgtype: $msgtype, body: $body, format: "org.matrix.custom.html", formatted_body: $formattedBody}')
|
||||
${pkgs.curl}/bin/curl -X POST "https://${server}/_matrix/client/r0/rooms/${target}/send/m.room.message" \
|
||||
-d "$JSON_PAYLOAD" \
|
||||
-H "Authorization: Bearer $MATRIX_TOKEN" \
|
||||
-H "Content-Type: application/json"
|
||||
'';
|
||||
matrix-kmein = pkgs.panoptikonReporters.matrix {
|
||||
homeserver = "matrix.4d2.org";
|
||||
roomId = lib.escapeShellArg "!zlwCuPiCNMSxDviFzA:4d2.org";
|
||||
tokenPath = config.age.secrets.matrix-token-lakai.path;
|
||||
};
|
||||
|
||||
matrix-kmein = matrix { target = "!zlwCuPiCNMSxDviFzA:4d2.org"; };
|
||||
telegram-kmein = pkgs.panoptikonReporters.telegram {
|
||||
tokenPath = config.age.secrets.telegram-token-kmein.path;
|
||||
chatId = "-1001796440545";
|
||||
};
|
||||
|
||||
telegram-kmein =
|
||||
let
|
||||
chatId = "-1001796440545";
|
||||
in
|
||||
pkgs.writers.writeDash "telegram-fulltext" ''
|
||||
export TOKEN="$(cat "$CREDENTIALS_DIRECTORY/token")"
|
||||
${pkgs.curl}/bin/curl -X POST "https://api.telegram.org/bot''${TOKEN}/sendMessage" \
|
||||
-d chat_id=${chatId} \
|
||||
-d text="$(cat)" \
|
||||
| ${pkgs.jq}/bin/jq -e .ok
|
||||
'';
|
||||
|
||||
irc-kmein = pkgs.lib.panoptikon.kpaste-irc {
|
||||
irc-kmein = pkgs.panoptikonReporters.kpaste-irc {
|
||||
messagePrefix = "$PANOPTIKON_WATCHER: ";
|
||||
target = "kmein";
|
||||
nick = "panoptikon-kmein";
|
||||
@@ -48,7 +29,12 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
age.secrets.telegram-token-kmein.file = ../../secrets/telegram-token-kmein.age;
|
||||
age.secrets.telegram-token-kmein = {
|
||||
file = ../../secrets/telegram-token-kmein.age;
|
||||
owner = "panoptikon";
|
||||
group = "panoptikon";
|
||||
mode = "400";
|
||||
};
|
||||
age.secrets.matrix-token-lakai = {
|
||||
file = ../../secrets/matrix-token-lakai.age;
|
||||
owner = "panoptikon";
|
||||
@@ -60,7 +46,7 @@ in
|
||||
enable = true;
|
||||
watchers = {
|
||||
"github-meta" = {
|
||||
script = pkgs.lib.panoptikon.urlJSON {
|
||||
script = pkgs.panoptikonWatchers.json {
|
||||
jqScript = ''
|
||||
{
|
||||
ssh_key_fingerprints: .ssh_key_fingerprints,
|
||||
@@ -70,83 +56,71 @@ in
|
||||
} "https://api.github.com/meta";
|
||||
reporters = [ irc-xxx ];
|
||||
};
|
||||
lammla = {
|
||||
script = pkgs.lib.panoptikon.url "http://lammla.info/index.php?reihe=30";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
kratylos = {
|
||||
script = pkgs.lib.panoptikon.url "https://kratylos.reichert-online.org/current_issue/KRATYLOS";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
kobudo-tesshinkan = {
|
||||
script = pkgs.lib.panoptikon.url "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
script = pkgs.panoptikonWatchers.html "https://kobudo-tesshinkan.eu/index.php/de/termine-berichte/lehrgaenge/";
|
||||
reporters = [
|
||||
telegram-kmein
|
||||
matrix-kmein
|
||||
];
|
||||
};
|
||||
zeno-free = {
|
||||
script = pkgs.lib.panoptikon.urlSelector ".zenoCOMain" "http://www.zeno.org/Lesesaal/M/E-Books";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
carolinawelslau = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#main" "https://carolinawelslau.de/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#main" "https://carolinawelslau.de/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
humboldt-preis = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#content-core" "https://www.hu-berlin.de/de/ueberblick/menschen/ehrungen/humboldtpreis";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
lisalittmann = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://lisalittmann.de/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
lisalittmann-archive = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://lisalittmann.de/archive/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
lisalittmann-projects = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://lisalittmann.de/projects/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
tatort = {
|
||||
script = pkgs.lib.panoptikon.urlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector ".linklist" "https://www.daserste.de/unterhaltung/krimi/tatort/sendung/index.html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
warpgrid-idiomarium = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://warpgrid.de/idiomarium/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
warpgrid-futurism = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://warpgrid.de/futurism/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
warpgrid-imagiary = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://warpgrid.de/imagiary/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
warpgrid-alchemy = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#site-content" "https://warpgrid.de/alchemy/";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
indogermanische-forschungen = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#latestIssue" "https://www.degruyter.com/journal/key/INDO/html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
ig-neuigkeiten = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/aktuelles/neuigkeiten.html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
ig-tagungen = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "[itemprop=articleBody]" "https://www.indogermanistik.org/tagungen/tagungen-der-ig.html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
fu-distant = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#current_events" "https://www.geschkult.fu-berlin.de/en/e/ma-distant/Termine/index.html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
fu-aegyptologie = {
|
||||
script = pkgs.lib.panoptikon.urlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
script = pkgs.panoptikonWatchers.htmlSelector "#current_events" "https://www.geschkult.fu-berlin.de/e/aegyptologie/termine/index.html";
|
||||
reporters = [ matrix-kmein ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
zramSwap.enable = true;
|
||||
|
||||
nix.settings.max-jobs = lib.mkDefault 2;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
zramSwap.enable = true;
|
||||
zramSwap.enable = false;
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user