add cache

This commit is contained in:
Henry Hiles 2026-02-26 12:12:10 -05:00
commit 725c40dd2e
No known key found for this signature in database
3 changed files with 58 additions and 57 deletions

50
flake.lock generated
View file

@ -377,11 +377,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770499719, "lastModified": 1770846765,
"narHash": "sha256-FuTZ7wJmhq5myL5SCQTTlEbuKyZhGvGlEmCZcHla6rw=", "narHash": "sha256-SiXXl7/2Tm/BNKp0Df2lal/gO6mDXcCRZ2RIOXkafXI=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "f15283cb7fed0b1f46b1e7c221bd3b9e66c9ee5e", "rev": "40ee00c36b3496dc394e55fff03896219bfd9011",
"revCount": 13, "revCount": 14,
"type": "git", "type": "git",
"url": "https://git.federated.nexus/Henry-Hiles/cozybot" "url": "https://git.federated.nexus/Henry-Hiles/cozybot"
}, },
@ -563,11 +563,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769524058, "lastModified": 1771881364,
"narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=", "narHash": "sha256-A5uE/hMium5of/QGC6JwF5TGoDAfpNtW00T0s9u/PN8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d", "rev": "a4cb7bf73f264d40560ba527f9280469f1f081c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -669,11 +669,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1769534627, "lastModified": 1771204701,
"narHash": "sha256-zWHaHaj+g56VZlqy7siL4OQucd6RUo0vBIcJTqNMw4A=", "narHash": "sha256-BT2dt/yaaXpYdwX9EzkG/MOnaB1MLbTzV2pU5vI20NU=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "5d6052b18a6cfff6ee69859206c68b8f1947f970", "rev": "93011b4b88a93ffca3ad5d71b163ede327620d14",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1118,11 +1118,11 @@
}, },
"gnome-mobile": { "gnome-mobile": {
"locked": { "locked": {
"lastModified": 1748795015, "lastModified": 1771887417,
"narHash": "sha256-+XyXaa3KmgOykQpo6k4XsEaHWDGj8inCxMMGOWat4EM=", "narHash": "sha256-tE6poOHn9lZ+NdqOKrgcA/q5UPuDSgznatRfV2UUPHc=",
"owner": "chuangzhu", "owner": "chuangzhu",
"repo": "nixpkgs-gnome-mobile", "repo": "nixpkgs-gnome-mobile",
"rev": "825ebb10c8bf02cb4b6553f3b85e169dc92484d7", "rev": "45bf1c0c3f925958bf1311ea387238c2be6fd7b7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1199,11 +1199,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770491427, "lastModified": 1772060133,
"narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=", "narHash": "sha256-VuyRptb8v1lVGMlLp4/1vRX3Efwec0CN0S6mKmDPzLg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860", "rev": "ce9b6e52500a0ea0ec48f0bbf6d7a3e431d9dfa4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -2125,11 +2125,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1770197578, "lastModified": 1771848320,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", "rev": "2fc6539b481e1d2569f25f8799236694180c0993",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -2278,11 +2278,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1770499519, "lastModified": 1772122206,
"narHash": "sha256-K7pS4M5jzqyXkfZ1qmk+DPHnJfD6fPESdKCNiqqifVQ=", "narHash": "sha256-wJ5AOxaNi+YxLFuexjl2D7knrxWvp+r77Jm0N0pJt6o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "895c66264bbc5a52ebefac7e31c8c6911da980da", "rev": "5a4de535e79f79ede2f2a15af67024b4c94441de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -2808,11 +2808,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1770382623, "lastModified": 1771787992,
"narHash": "sha256-NB9j2JsIcSPcY7FzzoIqJA04p4xSdJpgyLAwzzzncpc=", "narHash": "sha256-Vg4bGwwenNYI8p3nJTl9FRyeIyrjATeZrZr+GyUSDrw=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "05c798e0074296df9bfc6ef3df0e936b878b835a", "rev": "30054cca073b49b42a71289edec858f535b27fe9",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,6 +2,7 @@
{ {
services.dnsproxy = { services.dnsproxy = {
enable = true; enable = true;
flags = [ "--cache" ];
settings = rec { settings = rec {
upstream = [ "https://base.dns.mullvad.net/dns-query" ]; upstream = [ "https://base.dns.mullvad.net/dns-query" ];
listen-addrs = [ "127.0.0.1" ]; listen-addrs = [ "127.0.0.1" ];

View file

@ -1,40 +1,40 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = [ # environment.systemPackages = [
(pkgs.writeShellApplication { # (pkgs.writeShellApplication {
name = "book"; # name = "book";
runtimeInputs = with pkgs; [ # runtimeInputs = with pkgs; [
libgourou # libgourou
calibre # calibre
]; # ];
text = '' # text = ''
input="$1" # input="$1"
if [ -f "$input" ] && echo "$input" | grep -qi "\.epub$"; then # if [ -f "$input" ] && echo "$input" | grep -qi "\.epub$"; then
fullpath="$input" # fullpath="$input"
else # else
if [ ! -d "$HOME/.config/adept" ]; then # if [ ! -d "$HOME/.config/adept" ]; then
adept_activate --anonymous # adept_activate --anonymous
fi # fi
fullpath=$(acsmdownloader --output-dir /tmp "$input" \ # fullpath=$(acsmdownloader --output-dir /tmp "$input" \
| tee /dev/tty \ # | tee /dev/tty \
| grep "^Created " \ # | grep "^Created " \
| sed "s/^Created //") # | sed "s/^Created //")
adept_remove "$fullpath" # adept_remove "$fullpath"
fi # fi
name=$(basename "$fullpath" | rev | cut -d. -f2- | rev) # name=$(basename "$fullpath" | rev | cut -d. -f2- | rev)
ext=$(echo "$fullpath" | rev | cut -d. -f1 | rev) # ext=$(echo "$fullpath" | rev | cut -d. -f1 | rev)
if [ "$ext" = "epub" ]; then # if [ "$ext" = "epub" ]; then
ebook-convert "$fullpath" "/run/media/quadradical/Kindle/documents/$name.mobi" # ebook-convert "$fullpath" "/run/media/quadradical/Kindle/documents/$name.mobi"
rm "$fullpath" # rm "$fullpath"
else # else
mv "$fullpath" "/run/media/quadradical/Kindle/documents/$name.pdf" # mv "$fullpath" "/run/media/quadradical/Kindle/documents/$name.pdf"
fi # fi
''; # '';
}) # })
]; # ];
} }