From 740081d9eecff224fe5aa398000f0dcb72ff89b5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 25 Apr 2025 14:52:15 +0200 Subject: bump --- _sources/generated.json | 24 +++++------ _sources/generated.nix | 24 +++++------ accounts/gkleen@sif/default.nix | 2 +- accounts/gkleen@sif/niri/default.nix | 4 -- accounts/gkleen@sif/zshrc | 15 +++++++ flake.lock | 48 ++++++++++----------- modules/tzupdate.nix | 81 ++++++++++++++++++++++++++++++++++++ overlays/swayosd/default.nix | 2 +- 8 files changed, 146 insertions(+), 54 deletions(-) create mode 100644 modules/tzupdate.nix diff --git a/_sources/generated.json b/_sources/generated.json index d9868b8e..d86f7005 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -99,7 +99,7 @@ }, "mako": { "cargoLocks": null, - "date": "2025-04-03", + "date": "2025-04-17", "extract": null, "name": "mako", "passthru": null, @@ -109,13 +109,13 @@ "fetchSubmodules": false, "leaveDotGit": false, "name": null, - "rev": "2763e92cecd7d0d58a03b5626a0bf1f7649c4ba5", - "sha256": "sha256-XMrwWVGp2ow1gCvjS1JbCerBNpRXzqsTMePFkSSjVXA=", + "rev": "84637d1cb42def0ef74d6ec961e05c3900b4c23f", + "sha256": "sha256-5Mv0P/SoUiJIiYvGm5wvNZhtz2ytwsqqRc3Pk3ju0WA=", "sparseCheckout": [], "type": "git", "url": "https://github.com/emersion/mako" }, - "version": "2763e92cecd7d0d58a03b5626a0bf1f7649c4ba5" + "version": "84637d1cb42def0ef74d6ec961e05c3900b4c23f" }, "mpv-autosave": { "cargoLocks": null, @@ -367,7 +367,7 @@ }, "swayosd": { "cargoLocks": null, - "date": "2025-03-03", + "date": "2025-04-20", "extract": null, "name": "swayosd", "passthru": null, @@ -377,13 +377,13 @@ "fetchSubmodules": false, "leaveDotGit": false, "name": null, - "rev": "b3c78fce3d90be2ce6a6ffee0e22a50379952e2b", - "sha256": "sha256-V3V18BoBRJU8mtvwWXvdYPbKBDIHdu5LzVSkDkGJjFU=", + "rev": "ce1f34d80a7f8b4393a5551ea0535bd8beabb28c", + "sha256": "sha256-Z9c/5jKxs5ctUuVu7g+BXA1Wy4lyZLpGATtj2jd84jI=", "sparseCheckout": [], "type": "git", "url": "https://github.com/ErikReider/SwayOSD" }, - "version": "b3c78fce3d90be2ce6a6ffee0e22a50379952e2b" + "version": "ce1f34d80a7f8b4393a5551ea0535bd8beabb28c" }, "tomorrow-night-paradise-theme": { "cargoLocks": null, @@ -407,7 +407,7 @@ }, "v4l2loopback": { "cargoLocks": null, - "date": "2025-04-12", + "date": "2025-04-16", "extract": null, "name": "v4l2loopback", "passthru": null, @@ -419,12 +419,12 @@ "name": null, "owner": "umlaeute", "repo": "v4l2loopback", - "rev": "5fae555286b74a61beb1e5b45b01ba7736a1c234", - "sha256": "sha256-cALS7DrSolAdFtE1YJpmNjq81CPbXA38YsFyx2sSLcQ=", + "rev": "119543510c0455f4e6517ae82d81d65354225a31", + "sha256": "sha256-1SAYXV0KEQEQEiQbBom2YHoeDzuDWkmCmcetlU85h/M=", "sparseCheckout": [], "type": "github" }, - "version": "5fae555286b74a61beb1e5b45b01ba7736a1c234" + "version": "119543510c0455f4e6517ae82d81d65354225a31" }, "xcompose": { "cargoLocks": null, diff --git a/_sources/generated.nix b/_sources/generated.nix index 3376df44..a7ebef8a 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -61,17 +61,17 @@ }; mako = { pname = "mako"; - version = "2763e92cecd7d0d58a03b5626a0bf1f7649c4ba5"; + version = "84637d1cb42def0ef74d6ec961e05c3900b4c23f"; src = fetchgit { url = "https://github.com/emersion/mako"; - rev = "2763e92cecd7d0d58a03b5626a0bf1f7649c4ba5"; + rev = "84637d1cb42def0ef74d6ec961e05c3900b4c23f"; fetchSubmodules = false; deepClone = false; leaveDotGit = false; sparseCheckout = [ ]; - sha256 = "sha256-XMrwWVGp2ow1gCvjS1JbCerBNpRXzqsTMePFkSSjVXA="; + sha256 = "sha256-5Mv0P/SoUiJIiYvGm5wvNZhtz2ytwsqqRc3Pk3ju0WA="; }; - date = "2025-04-03"; + date = "2025-04-17"; }; mpv-autosave = { pname = "mpv-autosave"; @@ -226,17 +226,17 @@ }; swayosd = { pname = "swayosd"; - version = "b3c78fce3d90be2ce6a6ffee0e22a50379952e2b"; + version = "ce1f34d80a7f8b4393a5551ea0535bd8beabb28c"; src = fetchgit { url = "https://github.com/ErikReider/SwayOSD"; - rev = "b3c78fce3d90be2ce6a6ffee0e22a50379952e2b"; + rev = "ce1f34d80a7f8b4393a5551ea0535bd8beabb28c"; fetchSubmodules = false; deepClone = false; leaveDotGit = false; sparseCheckout = [ ]; - sha256 = "sha256-V3V18BoBRJU8mtvwWXvdYPbKBDIHdu5LzVSkDkGJjFU="; + sha256 = "sha256-Z9c/5jKxs5ctUuVu7g+BXA1Wy4lyZLpGATtj2jd84jI="; }; - date = "2025-03-03"; + date = "2025-04-20"; }; tomorrow-night-paradise-theme = { pname = "tomorrow-night-paradise-theme"; @@ -254,15 +254,15 @@ }; v4l2loopback = { pname = "v4l2loopback"; - version = "5fae555286b74a61beb1e5b45b01ba7736a1c234"; + version = "119543510c0455f4e6517ae82d81d65354225a31"; src = fetchFromGitHub { owner = "umlaeute"; repo = "v4l2loopback"; - rev = "5fae555286b74a61beb1e5b45b01ba7736a1c234"; + rev = "119543510c0455f4e6517ae82d81d65354225a31"; fetchSubmodules = true; - sha256 = "sha256-cALS7DrSolAdFtE1YJpmNjq81CPbXA38YsFyx2sSLcQ="; + sha256 = "sha256-1SAYXV0KEQEQEiQbBom2YHoeDzuDWkmCmcetlU85h/M="; }; - date = "2025-04-12"; + date = "2025-04-16"; }; xcompose = { pname = "xcompose"; diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 1c2031b5..3b3c7fc5 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -398,7 +398,7 @@ in { fira-code-symbols libreoffice xournalpp google-chrome nixos-shell virt-viewer freerdp gnome-icon-theme paper-icon-theme sshpassSecret weechat element-desktop - sieve-connect gimp inkscape udiskie glab nitrokey-app + sieve-connect gimp3 inkscape udiskie glab nitrokey-app pynitrokey gtklock wlrctl remmina openscad spice-record libguestfs-with-appliance nerd-fonts.fira-mono nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index b5347d6f..0e25fc95 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix @@ -273,8 +273,6 @@ in { workspaces = list() def focus_workspace(output, workspace): - global workspace_history, history_lock - with history_lock: workspace_history[output] = [workspace] + [ws for ws in workspace_history[output] if ws != workspace] # noqa: E501 print(json.dumps(workspace_history), file=sys.stderr) @@ -299,8 +297,6 @@ in { class RequestHandler(StreamRequestHandler): def handle(self): - global workspace_history, history_lock - with detaching(TextIOWrapper(self.wfile, encoding='utf-8', write_through=True)) as out: # noqa: E501 with history_lock: json.dump(workspace_history, out) diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index c628e2e9..362943f3 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -300,6 +300,21 @@ dichotomic_search() { echo $min } +sieve-edit() { + case "$host" in + surtr) + sieve-connect -s surtr.yggdrasil.li -m EXTERNAL --clientkey <(nix run nixos'#'sops -- decrypt ~flk/hosts/surtr/email/ca/gkleen@sif.key) --clientcert ~flk/hosts/surtr/email/ca/gkleen@sif.crt --edit --remotesieve sieve + ;; + ymir) + sieve-connect -s ymir.yggdrasil.li -u gkleen --edit --remotesieve sieve + ;; + *) + echo "Unknown host: ‘$host’" >&2 + exit 2 + ;; + esac +} + while read -r -d $'\0' d _ s; do hash -d ${s}=${d} done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -regex '\S+/[0-9]{2}[ws]/\S+' -print0 2>/dev/null | \ diff --git a/flake.lock b/flake.lock index faa3faff..f6af639b 100644 --- a/flake.lock +++ b/flake.lock @@ -397,11 +397,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1744480072, - "narHash": "sha256-h9MGdfc1ddQLaZ5eXdxUOY4SGvRe0IzIuX/03yVRras=", + "lastModified": 1745483403, + "narHash": "sha256-fNemxNtPugDzCK7ofPApufFhD4EW5PiA0v3+aS1O6rY=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "c845f42f0bf9a02350a1e561cb702911c61428a9", + "rev": "17ebd40a372527ad20cc799b1835beaf7abf7200", "type": "github" }, "original": { @@ -431,11 +431,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1744475937, - "narHash": "sha256-vJXhE2BCJO3AxGUGqL7GW7ReeAL+OKy80ErMYDuILjM=", + "lastModified": 1745351516, + "narHash": "sha256-nQRp1Q+kV137Dsk7WCsnq6zQA7YrvRll2wVcG7wZpHA=", "owner": "YaLTeR", "repo": "niri", - "rev": "95eafba346a17104a9af71021011fcdc9e13776b", + "rev": "6ab055a4b968ccf115a1be3b65b0d5ec4d7c33f1", "type": "github" }, "original": { @@ -472,11 +472,11 @@ ] }, "locked": { - "lastModified": 1744518957, - "narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=", + "lastModified": 1745120797, + "narHash": "sha256-owQ0VQ+7cSanTVPxaZMWEzI22Q4bGnuvhVjLAJBNQ3E=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd", + "rev": "69716041f881a2af935021c1182ed5b0cc04d40e", "type": "github" }, "original": { @@ -529,11 +529,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1744633460, - "narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=", + "lastModified": 1745392233, + "narHash": "sha256-xmqG4MZArM1JNxPJ33s0MtuBzgnaCO9laARoU3AfP8E=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9a049b4a421076d27fee3eec664a18b2066824cb", + "rev": "8bf8a2a0822365bd8f44fd1a19d7ed0a1d629d64", "type": "github" }, "original": { @@ -651,11 +651,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1744309437, - "narHash": "sha256-QZnNHM823am8apCqKSPdtnzPGTy2ZB4zIXOVoBp5+W0=", + "lastModified": 1745279238, + "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f9ebe33a928b5d529c895202263a5ce46bdf12f7", + "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", "type": "github" }, "original": { @@ -699,11 +699,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1744463964, - "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", "type": "github" }, "original": { @@ -913,11 +913,11 @@ ] }, "locked": { - "lastModified": 1744518500, - "narHash": "sha256-lv52pnfiRGp5+xkZEgWr56DWiRgkMFXpiGba3eJ3krE=", + "lastModified": 1745310711, + "narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=", "owner": "Mic92", "repo": "sops-nix", - "rev": "7e147a1ae90f0d4a374938cdc3df3cdaecb9d388", + "rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c", "type": "github" }, "original": { @@ -1022,11 +1022,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1743346993, - "narHash": "sha256-i7rWd/5BcqLgQEtB5L/6gKN5R5GUJcmm34F+iBivH60=", + "lastModified": 1745372360, + "narHash": "sha256-5DX9lYmEbkdANCzME2v3coV0EnWOhS7NsTlGBQuqmjM=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "45c055696437a08e3989d9b91d9c617b84cc2bc3", + "rev": "c31679aa41966ee9272bb240703755cb1e7c72e3", "type": "github" }, "original": { diff --git a/modules/tzupdate.nix b/modules/tzupdate.nix new file mode 100644 index 00000000..6465d33f --- /dev/null +++ b/modules/tzupdate.nix @@ -0,0 +1,81 @@ +{ + config, + lib, + pkgs, + ... +}: +let + cfg = config.services.tzupdate; +in +{ + disabledModules = [ "services/misc/tzupdate.nix" ]; + + options.services.tzupdate = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + description = '' + Enable the tzupdate timezone updating service. This provides + a one-shot service which can be activated with systemctl to + update the timezone. + ''; + }; + + package = lib.mkPackageOption pkgs "tzupdate" { }; + + timer.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Enable the tzupdate timer to update the timezone automatically. + ''; + }; + + timer.interval = lib.mkOption { + type = lib.types.str; + default = "hourly"; + description = '' + The interval at which the tzupdate timer should run. See + {manpage}`systemd.time(7)` to understand the format. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + # We need to have imperative time zone management for this to work. + # This will give users an error if they have set an explicit time + # zone, which is better than silently overriding it. + time.timeZone = null; + + # We provide a one-shot service that runs at startup once network + # interfaces are up, but we can’t ensure we actually have Internet access + # at that point. It can also be run manually with `systemctl start tzupdate`. + systemd.services.tzupdate = { + description = "tzupdate timezone update service"; + wantedBy = [ "multi-user.target" ]; + wants = [ "network-online.target" ]; + after = [ "network-online.target" ]; + script = '' + timezone="$(${lib.getExe cfg.package} --print-only)" + if [[ -n "$timezone" ]]; then + echo "Setting timezone to '$timezone'" + ${lib.getExe' config.systemd.package "timedatectl"} set-timezone "$timezone" + fi + ''; + + serviceConfig = { + Type = "oneshot"; + }; + }; + + systemd.timers.tzupdate = { + enable = cfg.timer.enable; + timerConfig = { + OnStartupSec = "30s"; + OnCalendar = cfg.timer.interval; + Persistent = true; + }; + wantedBy = [ "timers.target" ]; + }; + }; +} diff --git a/overlays/swayosd/default.nix b/overlays/swayosd/default.nix index b535f7f9..b4601a03 100644 --- a/overlays/swayosd/default.nix +++ b/overlays/swayosd/default.nix @@ -4,7 +4,7 @@ cargoDeps = prev.rustPlatform.fetchCargoVendor { inherit (oldAttrs) pname; inherit version src; - hash = "sha256-b5Ei6k9p/KiyiSSl5zxDXrTgGAq24O5ll0BvyJ/41F8="; + hash = "sha256-yWybf4GKxHrk4WrW5SmjfPD0Gv79tpXOwNLlWeykYy0="; }; patches = (oldAttrs.patches or []) ++ [ ./exponential.patch -- cgit v1.2.3