From ba907ef7b4f5962a11c20adb4036b6ddad26a000 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 22 Jun 2025 21:13:23 +0200 Subject: ... --- _sources/generated.json | 42 +++---- _sources/generated.nix | 42 +++---- accounts/gkleen@sif/niri/default.nix | 221 +++++++++++++++++------------------ accounts/gkleen@sif/systemd.nix | 2 + accounts/gkleen@sif/zshrc | 4 +- flake.lock | 216 +++++++++++++++++++++------------- flake.nix | 17 +-- hosts/eostre/default.nix | 21 +--- hosts/sif/default.nix | 2 +- hosts/surtr/default.nix | 1 - hosts/surtr/email/default.nix | 3 + hosts/vidhar/default.nix | 2 +- lib/pythonSet.nix | 14 +++ modules/borgcopy/.envrc | 4 + modules/borgcopy/.gitignore | 2 + modules/borgcopy/default.nix | 39 ++++--- modules/borgcopy/poetry.lock | 180 ---------------------------- modules/borgcopy/pyproject.toml | 33 +++--- modules/borgcopy/uv.lock | 146 +++++++++++++++++++++++ modules/llvm_kernel.nix | 59 ++++++++++ overlays/prometheus-lvm-exporter.nix | 2 +- system-profiles/core/default.nix | 8 +- system-profiles/nfsroot.nix | 2 +- system-profiles/zfs.nix | 5 +- user-profiles/yt-dlp.nix | 4 +- 25 files changed, 584 insertions(+), 487 deletions(-) create mode 100644 modules/borgcopy/.envrc create mode 100644 modules/borgcopy/.gitignore delete mode 100644 modules/borgcopy/poetry.lock create mode 100644 modules/borgcopy/uv.lock create mode 100644 modules/llvm_kernel.nix diff --git a/_sources/generated.json b/_sources/generated.json index d98f141f..ad09ec7c 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -22,7 +22,7 @@ }, "bpf-examples": { "cargoLocks": null, - "date": "2025-03-06", + "date": "2025-05-27", "extract": null, "name": "bpf-examples", "passthru": null, @@ -34,12 +34,12 @@ "name": null, "owner": "xdp-project", "repo": "bpf-examples", - "rev": "64e7da048b14822bef06f3971189c4c0985422e7", - "sha256": "sha256-cyyRNvU35ujxkLraOqw2oiZwUblBpJaEncPl2++VHL4=", + "rev": "4fae19c659726963d5195ec124f01634620f0c71", + "sha256": "sha256-PKvknYKq/BYtzRvXZT4t76DdC794aj9uYXXE/tHtY2o=", "sparseCheckout": [], "type": "github" }, - "version": "64e7da048b14822bef06f3971189c4c0985422e7" + "version": "4fae19c659726963d5195ec124f01634620f0c71" }, "emacs-scratch_el": { "cargoLocks": null, @@ -91,11 +91,11 @@ "passthru": null, "pinned": false, "src": { - "sha256": "sha256-afJuTByGUMU6kFqGGa3pbPaFVdYGcJYiR0RfDNYNgDk=", + "sha256": "sha256-GCtcIXGrMH6LOKxjnB2SkUSChQnMj5d939i2atvqK+Q=", "type": "tarball", - "url": "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.17.tar.gz" + "url": "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.18.tar.gz" }, - "version": "2.17" + "version": "2.18" }, "mako": { "cargoLocks": null, @@ -327,11 +327,11 @@ "passthru": null, "pinned": false, "src": { - "sha256": "sha256-Nz/lBhQbzWSnOKN4n0OUdJzDTpf3mfY0+FXoCqF03TU=", + "sha256": "sha256-Ooaj+5npHkgo4eoletkhFbGQL+1ScE+39MaL6bnp+yw=", "type": "tarball", - "url": "https://github.com/hansmi/prometheus-lvm-exporter/archive/refs/tags/v0.4.0.tar.gz" + "url": "https://github.com/hansmi/prometheus-lvm-exporter/archive/refs/tags/v0.5.0.tar.gz" }, - "version": "0.4.0" + "version": "0.5.0" }, "psql-versioning": { "cargoLocks": null, @@ -437,7 +437,7 @@ }, "v4l2loopback": { "cargoLocks": null, - "date": "2025-04-29", + "date": "2025-06-11", "extract": null, "name": "v4l2loopback", "passthru": null, @@ -449,16 +449,16 @@ "name": null, "owner": "umlaeute", "repo": "v4l2loopback", - "rev": "8d806ad688961d8840081a609c39d1a82d296b24", - "sha256": "sha256-zuE/qFI8QCWCePmHWjTIPTh2KzmDkwQ2uj5C1dAwo1c=", + "rev": "8219e4b00101dba8b6865108405cf656302a173d", + "sha256": "sha256-oaPhLQPM9zywRrEklZBC8Unz3gKfNwxin2ukh3ZCfbI=", "sparseCheckout": [], "type": "github" }, - "version": "8d806ad688961d8840081a609c39d1a82d296b24" + "version": "8219e4b00101dba8b6865108405cf656302a173d" }, "xcompose": { "cargoLocks": null, - "date": "2025-03-11", + "date": "2025-06-05", "extract": null, "name": "xcompose", "passthru": null, @@ -470,12 +470,12 @@ "name": null, "owner": "kragen", "repo": "xcompose", - "rev": "8b5a6a0c788fd0a4b921d9d3737174defb863873", - "sha256": "sha256-6EjQErdBOd5hqcrdaf88E1UZVYIc3FOfv34hvUwOWdA=", + "rev": "4d8eab4d05a19537ce79294ae0459fdae78ffb20", + "sha256": "sha256-vKY4u5Z2IL111orLLkkF4AoVzqluKG/VQhNUUCqO/k8=", "sparseCheckout": [], "type": "github" }, - "version": "8b5a6a0c788fd0a4b921d9d3737174defb863873" + "version": "4d8eab4d05a19537ce79294ae0459fdae78ffb20" }, "yt-dlp": { "cargoLocks": null, @@ -486,10 +486,10 @@ "pinned": false, "src": { "name": null, - "sha256": "sha256-6nOFTF2rwSTymjWo+um8XUIu8yMb6+6ivfqCrBkanCk=", + "sha256": "sha256-dR9To7YTU1Ir+AX6MLvL0WZmEmU345cG6rT4w2jxEaw=", "type": "url", - "url": "https://pypi.org/packages/source/y/yt_dlp/yt_dlp-2025.5.22.tar.gz" + "url": "https://pypi.org/packages/source/y/yt_dlp/yt_dlp-2025.6.9.tar.gz" }, - "version": "2025.5.22" + "version": "2025.6.9" } } \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix index 3bf73fed..a912f452 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -18,15 +18,15 @@ }; bpf-examples = { pname = "bpf-examples"; - version = "64e7da048b14822bef06f3971189c4c0985422e7"; + version = "4fae19c659726963d5195ec124f01634620f0c71"; src = fetchFromGitHub { owner = "xdp-project"; repo = "bpf-examples"; - rev = "64e7da048b14822bef06f3971189c4c0985422e7"; + rev = "4fae19c659726963d5195ec124f01634620f0c71"; fetchSubmodules = true; - sha256 = "sha256-cyyRNvU35ujxkLraOqw2oiZwUblBpJaEncPl2++VHL4="; + sha256 = "sha256-PKvknYKq/BYtzRvXZT4t76DdC794aj9uYXXE/tHtY2o="; }; - date = "2025-03-06"; + date = "2025-05-27"; }; emacs-scratch_el = { pname = "emacs-scratch_el"; @@ -53,10 +53,10 @@ }; lesspipe = { pname = "lesspipe"; - version = "2.17"; + version = "2.18"; src = fetchTarball { - url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.17.tar.gz"; - sha256 = "sha256-afJuTByGUMU6kFqGGa3pbPaFVdYGcJYiR0RfDNYNgDk="; + url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.18.tar.gz"; + sha256 = "sha256-GCtcIXGrMH6LOKxjnB2SkUSChQnMj5d939i2atvqK+Q="; }; }; mako = { @@ -196,10 +196,10 @@ }; prometheus-lvm-exporter = { pname = "prometheus-lvm-exporter"; - version = "0.4.0"; + version = "0.5.0"; src = fetchTarball { - url = "https://github.com/hansmi/prometheus-lvm-exporter/archive/refs/tags/v0.4.0.tar.gz"; - sha256 = "sha256-Nz/lBhQbzWSnOKN4n0OUdJzDTpf3mfY0+FXoCqF03TU="; + url = "https://github.com/hansmi/prometheus-lvm-exporter/archive/refs/tags/v0.5.0.tar.gz"; + sha256 = "sha256-Ooaj+5npHkgo4eoletkhFbGQL+1ScE+39MaL6bnp+yw="; }; }; psql-versioning = { @@ -270,34 +270,34 @@ }; v4l2loopback = { pname = "v4l2loopback"; - version = "8d806ad688961d8840081a609c39d1a82d296b24"; + version = "8219e4b00101dba8b6865108405cf656302a173d"; src = fetchFromGitHub { owner = "umlaeute"; repo = "v4l2loopback"; - rev = "8d806ad688961d8840081a609c39d1a82d296b24"; + rev = "8219e4b00101dba8b6865108405cf656302a173d"; fetchSubmodules = true; - sha256 = "sha256-zuE/qFI8QCWCePmHWjTIPTh2KzmDkwQ2uj5C1dAwo1c="; + sha256 = "sha256-oaPhLQPM9zywRrEklZBC8Unz3gKfNwxin2ukh3ZCfbI="; }; - date = "2025-04-29"; + date = "2025-06-11"; }; xcompose = { pname = "xcompose"; - version = "8b5a6a0c788fd0a4b921d9d3737174defb863873"; + version = "4d8eab4d05a19537ce79294ae0459fdae78ffb20"; src = fetchFromGitHub { owner = "kragen"; repo = "xcompose"; - rev = "8b5a6a0c788fd0a4b921d9d3737174defb863873"; + rev = "4d8eab4d05a19537ce79294ae0459fdae78ffb20"; fetchSubmodules = false; - sha256 = "sha256-6EjQErdBOd5hqcrdaf88E1UZVYIc3FOfv34hvUwOWdA="; + sha256 = "sha256-vKY4u5Z2IL111orLLkkF4AoVzqluKG/VQhNUUCqO/k8="; }; - date = "2025-03-11"; + date = "2025-06-05"; }; yt-dlp = { pname = "yt-dlp"; - version = "2025.5.22"; + version = "2025.6.9"; src = fetchurl { - url = "https://pypi.org/packages/source/y/yt_dlp/yt_dlp-2025.5.22.tar.gz"; - sha256 = "sha256-6nOFTF2rwSTymjWo+um8XUIu8yMb6+6ivfqCrBkanCk="; + url = "https://pypi.org/packages/source/y/yt_dlp/yt_dlp-2025.6.9.tar.gz"; + sha256 = "sha256-dR9To7YTU1Ir+AX6MLvL0WZmEmU345cG6rT4w2jxEaw="; }; }; } diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index 8752f3e3..35a3d799 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix @@ -3,6 +3,7 @@ let cfg = config.programs.niri; kdl = flakeInputs.niri-flake.lib.kdl; + sleaf = name: arg: kdl.node name [arg] []; niri = cfg.package; terminal = lib.getExe config.programs.kitty.package; @@ -450,7 +451,7 @@ in { { title = ".*Passkey credentials$"; } ]; windowRuleExtra = with kdl; [ - (kdl.leaf "open-focused" false) + (sleaf "open-focused" false) ]; key = "Mod+Control+P"; app-id = "org.keepassxc.KeePassXC"; @@ -488,7 +489,7 @@ in { exec dex $HOME/.local/state/nix/profile/share/applications/kimai.desktop '')) ]; windowRuleExtra = with kdl; [ - (leaf "block-out-from" "screencast") + (sleaf "block-out-from" "screencast") ]; } ]; @@ -500,10 +501,12 @@ in { then v else null; opt-props = lib.filterAttrs (lib.const (value: value != null)); + normalize-nodes = nodes: lib.remove null (lib.flatten nodes); in - [ (flag "prefer-no-csd") + normalize-nodes [ + (flag "prefer-no-csd") - (leaf "screenshot-path" "~/screenshots/%Y-%m-%dT%H:%M:%S.png") + (sleaf "screenshot-path" "~/screenshots/%Y-%m-%dT%H:%M:%S.png") (plain "hotkey-overlay" [ (flag "skip-at-startup") @@ -511,27 +514,27 @@ in { (plain "input" [ (plain "keyboard" [ - (leaf "repeat-delay" 300) - (leaf "repeat-rate" 50) + (sleaf "repeat-delay" 300) + (sleaf "repeat-rate" 50) (plain "xkb" [ - (leaf "layout" "us,us") - (leaf "variant" "dvp,") - (leaf "options" "compose:caps,grp:win_space_toggle") + (sleaf "layout" "us,us") + (sleaf "variant" "dvp,") + (sleaf "options" "compose:caps,grp:win_space_toggle") ]) ]) (flag "workspace-auto-back-and-forth") - # (leaf "focus-follows-mouse" {}) + # (sleaf "focus-follows-mouse" {}) # (flag "warp-mouse-to-focus") # (plain "touchpad" [ (flag "off") ]) (plain "trackball" [ - (leaf "scroll-method" "on-button-down") - (leaf "scroll-button" 278) + (sleaf "scroll-method" "on-button-down") + (sleaf "scroll-button" 278) ]) (plain "touch" [ - (leaf "map-to-output" "eDP-1") + (sleaf "map-to-output" "eDP-1") ]) ]) @@ -539,7 +542,7 @@ in { (plain "hot-corners" [(flag "off")]) ]) - (plain "environment" (lib.mapAttrsToList leaf { + (plain "environment" (lib.mapAttrsToList sleaf { NIXOS_OZONE_WL = "1"; QT_QPA_PLATFORM = "wayland"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; @@ -552,47 +555,47 @@ in { SUDO_ASKPASS = lib.getExe pkgs.kdePackages.ksshaskpass; })) - (node "output" "eDP-1" [ - (leaf "scale" 1.5) - (leaf "position" { x = 0; y = 0; }) + (node "output" ["eDP-1"] [ + (sleaf "scale" 1.5) + (sleaf "position" { x = 0; y = 0; }) ]) - (node "output" "Ancor Communications Inc ASUS PB287Q 0x0000DD9B" [ - (leaf "scale" 1.5) - (leaf "position" { x = 2560; y = 0; }) + (node "output" ["Ancor Communications Inc ASUS PB287Q 0x0000DD9B"] [ + (sleaf "scale" 1.5) + (sleaf "position" { x = 2560; y = 0; }) ]) - (node "output" "HP Inc. HP 727pu CN4417143K" [ - (leaf "mode" "2560x1440@119.998") - (leaf "scale" 1) - (leaf "position" { x = 2560; y = 0; }) + (node "output" ["HP Inc. HP 727pu CN4417143K"] [ + (sleaf "mode" "2560x1440@119.998") + (sleaf "scale" 1) + (sleaf "position" { x = 2560; y = 0; }) (flag "variable-refresh-rate") ]) (plain "debug" [ - (leaf "render-drm-device" "/dev/dri/by-path/pci-0000:00:02.0-render") + (sleaf "render-drm-device" "/dev/dri/by-path/pci-0000:00:02.0-render") ]) (plain "animations" [ - (leaf "slowdown" 0.5) + (sleaf "slowdown" 0.5) (plain "workspace-switch" [(flag "off")]) ]) (plain "layout" [ - (leaf "gaps" 8) + (sleaf "gaps" 8) (plain "struts" [ - (leaf "left" 26) - (leaf "right" 26) - (leaf "top" 0) - (leaf "bottom" 0) + (sleaf "left" 26) + (sleaf "right" 26) + (sleaf "top" 0) + (sleaf "bottom" 0) ]) (plain "border" [ - (leaf "width" 2) - (leaf "active-gradient" { + (sleaf "width" 2) + (sleaf "active-gradient" { from = "hsla(195 100% 45% 1)"; to = "hsla(155 100% 37.5% 1)"; angle = 29; relative-to = "workspace-view"; }) - (leaf "inactive-gradient" { + (sleaf "inactive-gradient" { from = "hsla(0 0% 27.7% 1)"; to = "hsla(0 0% 23% 1)"; angle = 29; @@ -603,29 +606,29 @@ in { (flag "off") ]) - (plain "preset-column-widths" (map (prop: leaf "proportion" prop) [ + (plain "preset-column-widths" (map (prop: sleaf "proportion" prop) [ (1. / 4.) (1. / 3.) (1. / 2.) (2. / 3.) (3. / 4.) (1.) ])) - (plain "default-column-width" [ (leaf "proportion" (1. / 2.)) ]) - (plain "preset-window-heights" (map (prop: leaf "proportion" prop) [ + (plain "default-column-width" [ (sleaf "proportion" (1. / 2.)) ]) + (plain "preset-window-heights" (map (prop: sleaf "proportion" prop) [ (1. / 3.) (1. / 2.) (2. / 3.) (1.) ])) (flag "always-center-single-column") (plain "tab-indicator" [ - (leaf "gap" 4) - (leaf "width" 8) - (leaf "gaps-between-tabs" 4) + (sleaf "gap" 4) + (sleaf "width" 8) + (sleaf "gaps-between-tabs" 4) (flag "place-within-column") - (leaf "length" { total-proportion = 1.; }) - (leaf "active-gradient" { + (sleaf "length" { total-proportion = 1.; }) + (sleaf "active-gradient" { from = "hsla(195 100% 60% 0.75)"; to = "hsla(155 100% 50% 0.75)"; angle = 29; relative-to = "workspace-view"; }) - (leaf "inactive-gradient" { + (sleaf "inactive-gradient" { from = "hsla(0 0% 42% 0.66)"; to = "hsla(0 0% 35% 0.66)"; angle = 29; @@ -639,129 +642,121 @@ in { ]) (map (name: - (node "workspace" name [ - (leaf "open-on-output" "eDP-1") + (node "workspace" [name] [ + (sleaf "open-on-output" "eDP-1") ]) ) (map ({name, ...}: name) cfg.scratchspaces)) (map (name: - (leaf "workspace" name) + (sleaf "workspace" name) ) ["comm" "web" "vid" "bmr"]) (plain "window-rule" [ - (leaf "clip-to-geometry" true) + (sleaf "clip-to-geometry" true) ]) (plain "window-rule" [ - (leaf "match" { is-floating = true; }) - (leaf "geometry-corner-radius" 8) + (sleaf "match" { is-floating = true; }) + (sleaf "geometry-corner-radius" 8) (plain "shadow" [ (flag "on") ]) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^org\\.keepassxc\\.KeePassXC$"; }) - (leaf "block-out-from" "screencast") + (sleaf "match" { app-id = "^org\\.keepassxc\\.KeePassXC$"; }) + (sleaf "block-out-from" "screencast") ]) - (plain "window-rule" [ + (plain "window-rule" (normalize-nodes [ (map (title: - (leaf "match" { app-id = "^org\\.keepassxc\\.KeePassXC$"; inherit title; }) + (sleaf "match" { app-id = "^org\\.keepassxc\\.KeePassXC$"; inherit title; }) ) ["^Unlock Database.*" "^Access Request.*" ".*Passkey credentials$" "Browser Access Request$"]) - (leaf "open-focused" true) - (leaf "open-floating" true) - ]) + (sleaf "open-focused" true) + (sleaf "open-floating" true) + ])) (map ({ name, match, exclude, windowRuleExtra, ... }: - (optional-node (match != []) (plain "window-rule" [ - (map (leaf "match") match) - (map (leaf "exclude") exclude) - (leaf "open-on-workspace" name) - (leaf "open-maximized" true) + (optional-node (match != []) (plain "window-rule" (normalize-nodes [ + (map (sleaf "match") match) + (map (sleaf "exclude") exclude) + (sleaf "open-on-workspace" name) + (sleaf "open-maximized" true) windowRuleExtra - ])) + ]))) ) cfg.scratchspaces) (plain "window-rule" [ - (leaf "match" { app-id = "^emacs$"; }) - (leaf "match" { app-id = "^firefox$"; }) - (plain "default-column-width" [(leaf "proportion" (2. / 3.))]) + (sleaf "match" { app-id = "^emacs$"; }) + (sleaf "match" { app-id = "^firefox$"; }) + (plain "default-column-width" [(sleaf "proportion" (2. / 3.))]) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^kitty$"; }) - (leaf "match" { app-id = "^kitty-play$"; }) - (plain "default-column-width" [(leaf "proportion" (1. / 3.))]) + (sleaf "match" { app-id = "^kitty$"; }) + (sleaf "match" { app-id = "^kitty-play$"; }) + (plain "default-column-width" [(sleaf "proportion" (1. / 3.))]) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^thunderbird$"; }) - (leaf "match" { app-id = "^Element$"; }) - (leaf "match" { app-id = "^chrome-web\.openrainbow\.com__-Default$"; }) - (leaf "open-on-workspace" "comm") + (sleaf "match" { app-id = "^thunderbird$"; }) + (sleaf "match" { app-id = "^Element$"; }) + (sleaf "match" { app-id = "^chrome-web\.openrainbow\.com__-Default$"; }) + (sleaf "open-on-workspace" "comm") ]) (plain "window-rule" [ - (leaf "match" { app-id = "^firefox$"; }) - (leaf "open-on-workspace" "web") - (leaf "open-maximized" true) + (sleaf "match" { app-id = "^firefox$"; }) + (sleaf "open-on-workspace" "web") + (sleaf "open-maximized" true) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^mpv$"; }) - (leaf "open-on-workspace" "vid") - (plain "default-column-width" [(leaf "proportion" 1.)]) + (sleaf "match" { app-id = "^mpv$"; }) + (sleaf "open-on-workspace" "vid") + (plain "default-column-width" [(sleaf "proportion" 1.)]) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^kitty-play$"; }) - (leaf "open-on-workspace" "vid") - (leaf "open-focused" false) + (sleaf "match" { app-id = "^kitty-play$"; }) + (sleaf "open-on-workspace" "vid") + (sleaf "open-focused" false) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^chrome-audiobookshelf\.yggdrasil\.li__-Default$"; }) - (leaf "match" { app-id = "^YouTube Music Desktop App$"; }) - (leaf "open-on-workspace" "vid") + (sleaf "match" { app-id = "^chrome-audiobookshelf\.yggdrasil\.li__-Default$"; }) + (sleaf "match" { app-id = "^YouTube Music Desktop App$"; }) + (sleaf "open-on-workspace" "vid") ]) (plain "window-rule" [ - (leaf "match" { app-id = "^pdfpc$"; }) - (plain "default-column-width" [(leaf "proportion" 1.)]) + (sleaf "match" { app-id = "^pdfpc$"; }) + (plain "default-column-width" [(sleaf "proportion" 1.)]) ]) (plain "window-rule" [ - (leaf "match" { app-id = "^pdfpc$"; title = "^.*presentation.*$"; }) - (plain "default-column-width" [(leaf "proportion" 1.)]) - (leaf "open-fullscreen" true) - (leaf "open-on-workspace" "bmr") - (leaf "open-focused" false) + (sleaf "match" { app-id = "^pdfpc$"; title = "^.*presentation.*$"; }) + (plain "default-column-width" [(sleaf "proportion" 1.)]) + (sleaf "open-fullscreen" true) + (sleaf "open-on-workspace" "bmr") + (sleaf "open-focused" false) ]) - (plain "window-rule" [ - (map (leaf "match") [ + (plain "window-rule" (normalize-nodes [ + (map (sleaf "match") [ { app-id = "^Gimp-"; title = "^Quit GIMP$"; } { app-id = "^org\\.kde\\.polkit-kde-authentication-agent-1$"; } { app-id = "^xdg-desktop-portal-gtk$"; } ]) - (leaf "open-floating" true) - ]) + (sleaf "open-floating" true) + ])) (plain "window-rule" [ - (leaf "match" { app-id = "^org\\.pwmt\\.zathura$"; }) - (leaf "match" { app-id = "^evince$"; }) - (leaf "match" { app-id = "^org\\.gnome\\.Papers$"; }) - (leaf "default-column-display" "tabbed") + (sleaf "match" { app-id = "^org\\.pwmt\\.zathura$"; }) + (sleaf "match" { app-id = "^evince$"; }) + (sleaf "match" { app-id = "^org\\.gnome\\.Papers$"; }) + (sleaf "default-column-display" "tabbed") ]) (plain "layer-rule" [ - (leaf "match" { namespace = "^notifications$"; }) - (leaf "match" { namespace = "^waybar$"; }) - (leaf "match" { namespace = "^launcher$"; }) - (leaf "block-out-from" "screencast") + (sleaf "match" { namespace = "^notifications$"; }) + (sleaf "match" { namespace = "^waybar$"; }) + (sleaf "match" { namespace = "^launcher$"; }) + (sleaf "block-out-from" "screencast") ]) (plain "binds" (let - bind = name: cfg: node name (opt-props { - cooldown-ms = cfg.cooldown-ms or null; - } - // (lib.optionalAttrs (!(cfg.repeat or true)) { - repeat = false; - }) - // (lib.optionalAttrs (cfg.allow-when-locked or false) { - allow-when-locked = true; - })) (lib.mapAttrsToList leaf (lib.removeAttrs cfg.action ["__functor"])); + bind = name: cfg: node name [(lib.removeAttrs cfg ["action"])] (lib.mapAttrsToList leaf (lib.removeAttrs cfg.action ["__functor"])); in - [ + normalize-nodes [ (lib.mapAttrsToList bind (with config.lib.niri.actions; { "Mod+Slash".action = show-hotkey-overlay; diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 90cccc58..18c2315f 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -385,6 +385,8 @@ in { }; Service = { ExecStart = "${config.systemd.package}/lib/systemd/systemd-socket-proxyd --exit-idle-time=60s 127.0.0.1:${toString (port + 1)}"; + Restart = "always"; + RestartSec = "23s"; }; }) [{ host = "proxy.ssh.math.lmu.de"; port = 8118; } { host = "proxy.vidhar"; port = 8120; } { host = "proxy.mathw0h"; port = 8122; } { host = "proxy.mathw0e"; port = 8124; }]); sockets = listToAttrs (map (port: nameValuePair "proxy-to-autossh-socks@${toString port}" { diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index abc200c6..b24ff257 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -93,7 +93,7 @@ dir() { if [[ $curlArchive = "true" ]]; then archiveFile=$(mktemp -t "archive.XXXXXXXXXX.${templateArchive:t}") - curl -L -o ${archiveFile} ${templateArchive} + curl -SfL -o ${archiveFile} ${templateArchive} templateArchive=${archiveFile} fi @@ -231,7 +231,7 @@ clock() { } public-ip() { - curl -s -H 'Accept: application/json' $@ ifconfig.co | jq -r '.ip' + curl -sSf -H 'Accept: application/json' $@ ifconfig.co | jq -r '.ip' } swap() { diff --git a/flake.lock b/flake.lock index cab6ae5f..5a9e4420 100644 --- a/flake.lock +++ b/flake.lock @@ -6,22 +6,28 @@ "nixpkgs": [ "nixpkgs" ], - "poetry2nix": [ - "poetry2nix" + "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "pyproject-build-systems": [ + "pyproject-build-systems" + ], + "pyproject-nix": [ + "pyproject-nix" ], - "pre-commit-hooks-nix": "pre-commit-hooks-nix" + "uv2nix": [ + "uv2nix" + ] }, "locked": { - "lastModified": 1723124245, - "narHash": "sha256-ThDq7vOXo6G4+C5FHqUc64CeX2c5n36tln4ZlDao6s4=", + "lastModified": 1749560907, + "narHash": "sha256-zvAxxnJ5dcnjbuog0W6UvlthD1dLm5t4ZQI25jzNDW4=", "owner": "gkleen", "repo": "backup-utils", - "rev": "74e65090de63fc99f056098677cc490754e2708f", + "rev": "8ed6a1d7c2e337cb2e35ed68f6d852f0d1049908", "type": "gitlab" }, "original": { "owner": "gkleen", - "ref": "v0.1.6", + "ref": "v0.1.7", "repo": "backup-utils", "type": "gitlab" } @@ -33,22 +39,26 @@ "nixpkgs": [ "nixpkgs" ], - "poetry2nix": [ - "poetry2nix" + "pre-commit-hooks-nix": "pre-commit-hooks-nix_2", + "pyproject-build-systems": "pyproject-build-systems", + "pyproject-nix": [ + "pyproject-nix" ], - "pre-commit-hooks-nix": "pre-commit-hooks-nix_2" + "uv2nix": [ + "uv2nix" + ] }, "locked": { - "lastModified": 1734281899, - "narHash": "sha256-9QdIl3sjHY4Xij9KrBUkW1KpLB+jyxlI12UHPitlawI=", + "lastModified": 1750599403, + "narHash": "sha256-MLQ7CISl00w1xq88TL2wukNq3ukzID4u7BVT4okbUik=", "owner": "gkleen", "repo": "ca", - "rev": "1e4ee9d25a5282ef7bc6774072229784fa0036f3", + "rev": "505a29233ada969b2eca76d616b0d7a8767dfb71", "type": "gitlab" }, "original": { "owner": "gkleen", - "ref": "v3.1.3", + "ref": "v3.1.5", "repo": "ca", "type": "gitlab" } @@ -66,11 +76,11 @@ ] }, "locked": { - "lastModified": 1727447169, - "narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=", + "lastModified": 1749105467, + "narHash": "sha256-hXh76y/wDl15almBcqvjryB50B0BaiXJKk20f314RoE=", "owner": "serokell", "repo": "deploy-rs", - "rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76", + "rev": "6bc76b872374845ba9d645a2f012b764fecd765f", "type": "github" }, "original": { @@ -343,16 +353,16 @@ ] }, "locked": { - "lastModified": 1747139300, - "narHash": "sha256-V+YnIIM2wMprHGgzOU0HzyeWQEjP6EhG8kc4IffWFeg=", + "lastModified": 1749562430, + "narHash": "sha256-M5MqsIsf+o7yngakVUW4poBGZaghB6sUpw7SsWA55kU=", "owner": "gkleen", "repo": "home-manager", - "rev": "50182497604587a24bdbe97d6400b1696eac57b1", + "rev": "dca5a2df9f8a00cc34bea6ead249a8446f5f069e", "type": "github" }, "original": { "owner": "gkleen", - "ref": "nixos-late-start-23.11", + "ref": "nixos-late-start-25.05", "repo": "home-manager", "type": "github" } @@ -392,16 +402,16 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs-stable": "nixpkgs-stable_3", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1747638609, - "narHash": "sha256-rPTN667tMqC1IQYgsnotVfXbVNbOzScxn0ontMkkSPk=", + "lastModified": 1750471128, + "narHash": "sha256-oR2yjhAPXZDmfFb4UwBeVQcJBtrUNFwufovzN8sTBVc=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "af697f3a8665c8d0770485a2e659ddde88430e3b", + "rev": "13e7a34df7aa4e7d8ec4dd9df9d5a01973f28f49", "type": "github" }, "original": { @@ -414,16 +424,16 @@ "niri-stable": { "flake": false, "locked": { - "lastModified": 1740117926, - "narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=", + "lastModified": 1748151941, + "narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=", "owner": "YaLTeR", "repo": "niri", - "rev": "b94a5db8790339cf9134873d8b490be69e02ac71", + "rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7", "type": "github" }, "original": { "owner": "YaLTeR", - "ref": "v25.02", + "ref": "v25.05.1", "repo": "niri", "type": "github" } @@ -431,11 +441,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1747635487, - "narHash": "sha256-za7ctGh4MaW1h5Drm1WtwNZxiXvQK9yXZAeeIyY9b2Q=", + "lastModified": 1750334747, + "narHash": "sha256-nsD1Z6vVP2Hhdgrd0uYHacre2+NhaH/53TFRXn6pRcs=", "owner": "YaLTeR", "repo": "niri", - "rev": "3f2b7e63ba15cf33475116d32e8b7d22208a8438", + "rev": "e0b0b04b445f7044f383e50104f861e632e1c905", "type": "github" }, "original": { @@ -472,11 +482,11 @@ ] }, "locked": { - "lastModified": 1747540584, - "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", + "lastModified": 1750565152, + "narHash": "sha256-A6ZIoIgaPPkzIVxKuaxwEJicPOeTwC/MD9iuC3FVhDM=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", + "rev": "78cd697acc2e492b4e92822a4913ffad279c20e6", "type": "github" }, "original": { @@ -514,11 +524,11 @@ ] }, "locked": { - "lastModified": 1747637556, - "narHash": "sha256-AYd1nE+BLWTZS8J0eFQ7kuNiuE+XjhhndoXinj7en/M=", + "lastModified": 1748140003, + "narHash": "sha256-DNBZmuk1YRM2PmwbHzVdXumRjCUzQkMarg4iI/37rOQ=", "owner": "AshleyYakeley", "repo": "NixVirt", - "rev": "a7d3d3ae8b9a0cf3ec3cf504bb593df0618a6dbc", + "rev": "5dfe108fd859b122f9a96981cb6bc12297653d6c", "type": "github" }, "original": { @@ -529,11 +539,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1747129300, - "narHash": "sha256-L3clA5YGeYCF47ghsI7Tcex+DnaaN/BbQ4dR2wzoiKg=", + "lastModified": 1750431636, + "narHash": "sha256-vnzzBDbCGvInmfn2ijC4HsIY/3W1CWbwS/YQoFgdgPg=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "e81fd167b33121269149c57806599045fd33eeed", + "rev": "1552a9f4513f3f0ceedcf90320e48d3d47165712", "type": "github" }, "original": { @@ -561,16 +571,16 @@ }, "nixpkgs-eostre": { "locked": { - "lastModified": 1701282334, - "narHash": "sha256-MxCVrXY6v4QmfTwIysjjaX0XUhqBbxTWWB4HXtDYsdk=", + "lastModified": 1748026580, + "narHash": "sha256-rWtXrcIzU5wm/C8F9LWvUfBGu5U5E7cFzPYT1pHIJaQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "057f9aecfb71c4437d2b27d3323df7f93c010b7e", + "rev": "11cb3517b3af6af300dd6c055aeda73c9bf52c48", "type": "github" }, "original": { "owner": "NixOS", - "ref": "23.11", + "ref": "25.05", "repo": "nixpkgs", "type": "github" } @@ -651,37 +661,53 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1747485343, - "narHash": "sha256-YbsZyuRE1tobO9sv0PUwg81QryYo3L1F3R3rF9bcG38=", + "lastModified": 1735563628, + "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b5ac7ad45298d58640540d0323ca217f32a6762", + "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "lastModified": 1750400657, + "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", "type": "github" }, "original": { "owner": "NixOS", - "ref": "24.05", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_4": { + "locked": { + "lastModified": 1748026580, + "narHash": "sha256-rWtXrcIzU5wm/C8F9LWvUfBGu5U5E7cFzPYT1pHIJaQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "11cb3517b3af6af300dd6c055aeda73c9bf52c48", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_5": { "locked": { "lastModified": 1678872516, "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", @@ -699,11 +725,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -812,10 +838,7 @@ "ca-util", "nixpkgs" ], - "nixpkgs-stable": [ - "ca-util", - "nixpkgs" - ] + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1734261738, @@ -837,7 +860,7 @@ "flake-utils": "flake-utils_2", "gitignore": "gitignore_3", "nixpkgs": "nixpkgs_3", - "nixpkgs-stable": "nixpkgs-stable_4" + "nixpkgs-stable": "nixpkgs-stable_5" }, "locked": { "lastModified": 1685361114, @@ -882,21 +905,50 @@ "pyproject-build-systems": { "inputs": { "nixpkgs": [ + "ca-util", "nixpkgs" ], "pyproject-nix": [ + "ca-util", "pyproject-nix" ], "uv2nix": [ + "ca-util", "uv2nix" ] }, "locked": { - "lastModified": 1744599653, - "narHash": "sha256-nysSwVVjG4hKoOjhjvE6U5lIKA8sEr1d1QzEfZsannU=", + "lastModified": 1749519371, + "narHash": "sha256-UJONN7mA2stweZCoRcry2aa1XTTBL0AfUOY84Lmqhos=", "owner": "pyproject-nix", "repo": "build-system-pkgs", - "rev": "7dba6dbc73120e15b558754c26024f6c93015dd7", + "rev": "7c06967eca687f3482624250428cc12f43c92523", + "type": "github" + }, + "original": { + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "type": "github" + } + }, + "pyproject-build-systems_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "pyproject-nix": [ + "pyproject-nix" + ], + "uv2nix": [ + "uv2nix" + ] + }, + "locked": { + "lastModified": 1749519371, + "narHash": "sha256-UJONN7mA2stweZCoRcry2aa1XTTBL0AfUOY84Lmqhos=", + "owner": "pyproject-nix", + "repo": "build-system-pkgs", + "rev": "7c06967eca687f3482624250428cc12f43c92523", "type": "github" }, "original": { @@ -912,11 +964,11 @@ ] }, "locked": { - "lastModified": 1746540146, - "narHash": "sha256-QxdHGNpbicIrw5t6U3x+ZxeY/7IEJ6lYbvsjXmcxFIM=", + "lastModified": 1750499893, + "narHash": "sha256-ThKBd8XSvITAh2JqU7enOp8AfKeQgf9u7zYC41cnBE4=", "owner": "pyproject-nix", "repo": "pyproject.nix", - "rev": "e09c10c24ebb955125fda449939bfba664c467fd", + "rev": "e824458bd917b44bf4c38795dea2650336b2f55d", "type": "github" }, "original": { @@ -944,11 +996,11 @@ "nixpkgs": "nixpkgs_2", "nixpkgs-eostre": "nixpkgs-eostre", "nixpkgs-pgbackrest": "nixpkgs-pgbackrest", - "nixpkgs-stable": "nixpkgs-stable_3", + "nixpkgs-stable": "nixpkgs-stable_4", "nvfetcher": "nvfetcher", "poetry2nix": "poetry2nix", "prometheus-borg-exporter": "prometheus-borg-exporter", - "pyproject-build-systems": "pyproject-build-systems", + "pyproject-build-systems": "pyproject-build-systems_2", "pyproject-nix": "pyproject-nix", "sops-nix": "sops-nix", "uv2nix": "uv2nix", @@ -962,11 +1014,11 @@ ] }, "locked": { - "lastModified": 1747603214, - "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", + "lastModified": 1750119275, + "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", "owner": "Mic92", "repo": "sops-nix", - "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", + "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", "type": "github" }, "original": { @@ -1037,11 +1089,11 @@ ] }, "locked": { - "lastModified": 1747441483, - "narHash": "sha256-W8BFXk5R0TuJcjIhcGoMpSOaIufGXpizK0pm+uTqynA=", + "lastModified": 1749778965, + "narHash": "sha256-MDq5YPXq3VO7aGrIIz9IMexJcdRiLCcDK4Bk3Kev7Sw=", "owner": "pyproject-nix", "repo": "uv2nix", - "rev": "582024dc64663e9f88d467c2f7f7b20d278349de", + "rev": "22ddf88e3a06551b769f0a585601d89180c69a38", "type": "github" }, "original": { @@ -1077,16 +1129,16 @@ "xwayland-satellite-stable": { "flake": false, "locked": { - "lastModified": 1739246919, - "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=", + "lastModified": 1748488455, + "narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d", + "rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73", "type": "github" }, "original": { "owner": "Supreeeme", - "ref": "v0.5.1", + "ref": "v0.6", "repo": "xwayland-satellite", "type": "github" } @@ -1094,11 +1146,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1747111562, - "narHash": "sha256-GAqhWoxaBIk0tgoecZPa8gTHDHxNc0JtlwWHZN2iOOo=", + "lastModified": 1750388715, + "narHash": "sha256-6WMpcn3Ga/L71NiX9SdWw7ZELpNfrFnWJ0Gt2uAHjJg=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "ec9ff64c1e0cbec42710b580b7c0f759b1694e72", + "rev": "03cbb2ee3a9da931bb9a39eb917674297a0b9318", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 20ab9f7e..8380f9c7 100644 --- a/flake.nix +++ b/flake.nix @@ -29,13 +29,13 @@ type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "24.05"; + ref = "25.05"; }; nixpkgs-eostre = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; - ref = "23.11"; + ref = "25.05"; }; home-manager = { type = "github"; @@ -53,7 +53,7 @@ type = "github"; owner = "gkleen"; repo = "home-manager"; - ref = "nixos-late-start-23.11"; + ref = "nixos-late-start-25.05"; inputs = { nixpkgs.follows = "nixpkgs-eostre"; }; @@ -145,20 +145,23 @@ type = "gitlab"; owner = "gkleen"; repo = "ca"; - ref = "v3.1.3"; + ref = "v3.1.5"; inputs = { + pyproject-nix.follows = "pyproject-nix"; + uv2nix.follows = "uv2nix"; nixpkgs.follows = "nixpkgs"; - poetry2nix.follows = "poetry2nix"; }; }; backup-utils = { type = "gitlab"; owner = "gkleen"; repo = "backup-utils"; - ref = "v0.1.6"; + ref = "v0.1.7"; inputs = { nixpkgs.follows = "nixpkgs"; - poetry2nix.follows = "poetry2nix"; + pyproject-nix.follows = "pyproject-nix"; + uv2nix.follows = "uv2nix"; + pyproject-build-systems.follows = "pyproject-build-systems"; }; }; prometheus-borg-exporter = { diff --git a/hosts/eostre/default.nix b/hosts/eostre/default.nix index fd4b15f2..d4113024 100644 --- a/hosts/eostre/default.nix +++ b/hosts/eostre/default.nix @@ -37,14 +37,10 @@ with lib; powerManagement.enable = true; }; - opengl.enable = true; + graphics.enable = true; }; - environment.etc."machine-id".text = "f457b21333f1491e916521151ff5d468"; - networking = { - hostId = "f457b213"; - domain = "lan.yggdrasil"; search = [ "lan.yggdrasil" "yggdrasil" ]; @@ -83,19 +79,14 @@ with lib; ]; }; - - services.xserver = { + services.displayManager.sddm = { enable = true; - displayManager.sddm = { - enable = true; - settings = { - Users.HideUsers = "gkleen"; - }; + wayland.enable = true; + settings = { + Users.HideUsers = "gkleen"; }; - desktopManager.plasma5.enable = true; - - videoDrivers = [ "nvidia" ]; }; + services.desktopManager.plasma6.enable = true; services.openssh = { diff --git a/hosts/sif/default.nix b/hosts/sif/default.nix index 6214569a..a57c454c 100644 --- a/hosts/sif/default.nix +++ b/hosts/sif/default.nix @@ -60,7 +60,7 @@ in { plymouth.enable = true; - kernelPackages = pkgs.linuxPackages_latest; + kernel.llvm.kernel = pkgs.linuxKernel.kernels.linux_latest; kernelPatches = [ { name = "edac-config"; patch = null; diff --git a/hosts/surtr/default.nix b/hosts/surtr/default.nix index 9d3101c0..63beece3 100644 --- a/hosts/surtr/default.nix +++ b/hosts/surtr/default.nix @@ -22,7 +22,6 @@ with lib; device = "/dev/vda"; }; - tmp.useTmpfs = true; zfs.devNodes = "/dev"; # /dev/vda2 does not show up in /dev/disk/by-id diff --git a/hosts/surtr/email/default.nix b/hosts/surtr/email/default.nix index c993bb18..58cb76d9 100644 --- a/hosts/surtr/email/default.nix +++ b/hosts/surtr/email/default.nix @@ -355,7 +355,10 @@ in { maxproc = 0; args = [ "-o" "header_checks=pcre:${pkgs.writeText "header_checks_submission" '' + if /^Received: / + !/by surtr\.yggdrasil\.li/ STRIP /^Received: from [^ ]+ \([^ ]+ [^ ]+\)\s+(.*)$/ REPLACE Received: $1 + endif ''}" ]; }; diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index 7da17e6f..547572c6 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -136,7 +136,7 @@ with lib; wantedBy = ["basic.target"]; serviceConfig = { ExecStart = pkgs.writeShellScript "limit-pstate-start" '' - echo 50 > /sys/devices/system/cpu/intel_pstate/max_perf_pct + echo 40 > /sys/devices/system/cpu/intel_pstate/max_perf_pct ''; RemainAfterExit = true; ExecStop = pkgs.writeShellScript "limit-pstate-stop" '' diff --git a/lib/pythonSet.nix b/lib/pythonSet.nix index 9dfb25ff..c69216cc 100644 --- a/lib/pythonSet.nix +++ b/lib/pythonSet.nix @@ -23,6 +23,20 @@ (final.resolveBuildSystem { setuptools = []; }) ]; }); + halo = (prev.halo.override { + sourcePreference = "sdist"; + }).overrideAttrs (oldAttrs: { + nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ + (final.resolveBuildSystem { setuptools = []; }) + ]; + }); + unshare = (prev.unshare.override { + sourcePreference = "sdist"; + }).overrideAttrs (oldAttrs: { + nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ + (final.resolveBuildSystem { setuptools = []; }) + ]; + }); }) ] ) diff --git a/modules/borgcopy/.envrc b/modules/borgcopy/.envrc new file mode 100644 index 00000000..01e755c1 --- /dev/null +++ b/modules/borgcopy/.envrc @@ -0,0 +1,4 @@ +use flake + +uv venv && uv sync +. .venv/bin/activate diff --git a/modules/borgcopy/.gitignore b/modules/borgcopy/.gitignore new file mode 100644 index 00000000..4ccfae70 --- /dev/null +++ b/modules/borgcopy/.gitignore @@ -0,0 +1,2 @@ +.venv +**/__pycache__ diff --git a/modules/borgcopy/default.nix b/modules/borgcopy/default.nix index 8e1afc27..af021777 100644 --- a/modules/borgcopy/default.nix +++ b/modules/borgcopy/default.nix @@ -1,25 +1,32 @@ -{ config, pkgs, lib, utils, flakeInputs, ... }: +{ config, pkgs, lib, utils, flake, flakeInputs, ... }: with lib; let - copyBorg = - with pkgs.poetry2nix; - mkPoetryApplication { - projectDir = cleanPythonSources { src = ./.; }; + copyBorg = let + workspace = flakeInputs.uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; }; + pythonSet = flake.lib.pythonSet { + inherit pkgs; + python = pkgs.python312; + overlay = workspace.mkPyprojectOverlay { + sourcePreference = "wheel"; + }; + }; + virtualEnv = pythonSet.mkVirtualEnv "copy_borg" workspace.deps.default; + in virtualEnv.overrideAttrs (oldAttrs: { + meta = (oldAttrs.meta or {}) // { + mainProgram = "copy_borg"; + }; - overrides = overrides.withDefaults (self: super: { - pyprctl = super.pyprctl.overridePythonAttrs (oldAttrs: { - buildInputs = (oldAttrs.buildInputs or []) ++ [super.setuptools]; - }); - inherit (pkgs.python3Packages) python-unshare; - }); + nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ pkgs.makeWrapper ]; - postInstall = '' - wrapProgram $out/bin/copy_borg \ - --prefix PATH : ${makeBinPath (with pkgs; [util-linux borgbackup])}:${config.security.wrapperDir} - ''; - }; + postInstall = '' + ${oldAttrs.postInstall or ""} + + wrapProgram $out/bin/copy_borg \ + --prefix PATH : ${makeBinPath (with pkgs; [util-linux borgbackup])}:${config.security.wrapperDir} + ''; + }); copyService = name: opts: nameValuePair "copy-borg@${utils.escapeSystemdPath name}" { restartIfChanged = false; diff --git a/modules/borgcopy/poetry.lock b/modules/borgcopy/poetry.lock deleted file mode 100644 index 759ecfe9..00000000 --- a/modules/borgcopy/poetry.lock +++ /dev/null @@ -1,180 +0,0 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "halo" -version = "0.0.31" -description = "Beautiful terminal spinners in Python" -category = "main" -optional = false -python-versions = ">=3.4" -files = [ - {file = "halo-0.0.31-py2-none-any.whl", hash = "sha256:5350488fb7d2aa7c31a1344120cee67a872901ce8858f60da7946cef96c208ab"}, - {file = "halo-0.0.31.tar.gz", hash = "sha256:7b67a3521ee91d53b7152d4ee3452811e1d2a6321975137762eb3d70063cc9d6"}, -] - -[package.dependencies] -colorama = ">=0.3.9" -log-symbols = ">=0.0.14" -six = ">=1.12.0" -spinners = ">=0.0.24" -termcolor = ">=1.1.0" - -[package.extras] -ipython = ["IPython (==5.7.0)", "ipywidgets (==7.1.0)"] - -[[package]] -name = "humanize" -version = "4.6.0" -description = "Python humanize utilities" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "humanize-4.6.0-py3-none-any.whl", hash = "sha256:401201aca462749773f02920139f302450cb548b70489b9b4b92be39fe3c3c50"}, - {file = "humanize-4.6.0.tar.gz", hash = "sha256:5f1f22bc65911eb1a6ffe7659bd6598e33dcfeeb904eb16ee1e705a09bf75916"}, -] - -[package.extras] -tests = ["freezegun", "pytest", "pytest-cov"] - -[[package]] -name = "log-symbols" -version = "0.0.14" -description = "Colored symbols for various log levels for Python" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "log_symbols-0.0.14-py3-none-any.whl", hash = "sha256:4952106ff8b605ab7d5081dd2c7e6ca7374584eff7086f499c06edd1ce56dcca"}, - {file = "log_symbols-0.0.14.tar.gz", hash = "sha256:cf0bbc6fe1a8e53f0d174a716bc625c4f87043cc21eb55dd8a740cfe22680556"}, -] - -[package.dependencies] -colorama = ">=0.3.9" - -[[package]] -name = "pyprctl" -version = "0.1.3" -description = "An interface to Linux's prctl() syscall written in pure Python using ctypes." -category = "main" -optional = false -python-versions = ">=3.6" -files = [ - {file = "pyprctl-0.1.3-py3-none-any.whl", hash = "sha256:6302e5114f078fb33e5799835d0a69e2fc180bb6b28ad073515fa40c5272f1dd"}, - {file = "pyprctl-0.1.3.tar.gz", hash = "sha256:1fb54d3ab030ec02e4afc38fb9662d6634c12834e91ae7959de56a9c09f69c26"}, -] - -[[package]] -name = "python-dateutil" -version = "2.8.2" -description = "Extensions to the standard Python datetime module" -category = "main" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -files = [ - {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, - {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, -] - -[package.dependencies] -six = ">=1.5" - -[[package]] -name = "python-unshare" -version = "0.2" -description = "Python bindings for the Linux unshare() syscall" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "python-unshare-0.2.tar.gz", hash = "sha256:f79b7de441b6c27930b775085a6a4fd2f378b628737aaaebc2a6c519023fd47a"}, -] - -[[package]] -name = "six" -version = "1.16.0" -description = "Python 2 and 3 compatibility utilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -files = [ - {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, - {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, -] - -[[package]] -name = "spinners" -version = "0.0.24" -description = "Spinners for terminals" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "spinners-0.0.24-py3-none-any.whl", hash = "sha256:2fa30d0b72c9650ad12bbe031c9943b8d441e41b4f5602b0ec977a19f3290e98"}, - {file = "spinners-0.0.24.tar.gz", hash = "sha256:1eb6aeb4781d72ab42ed8a01dcf20f3002bf50740d7154d12fb8c9769bf9e27f"}, -] - -[[package]] -name = "termcolor" -version = "2.2.0" -description = "ANSI color formatting for output in terminal" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "termcolor-2.2.0-py3-none-any.whl", hash = "sha256:91ddd848e7251200eac969846cbae2dacd7d71c2871e92733289e7e3666f48e7"}, - {file = "termcolor-2.2.0.tar.gz", hash = "sha256:dfc8ac3f350788f23b2947b3e6cfa5a53b630b612e6cd8965a015a776020b99a"}, -] - -[package.extras] -tests = ["pytest", "pytest-cov"] - -[[package]] -name = "tqdm" -version = "4.65.0" -description = "Fast, Extensible Progress Meter" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tqdm-4.65.0-py3-none-any.whl", hash = "sha256:c4f53a17fe37e132815abceec022631be8ffe1b9381c2e6e30aa70edc99e9671"}, - {file = "tqdm-4.65.0.tar.gz", hash = "sha256:1871fb68a86b8fb3b59ca4cdd3dcccbc7e6d613eeed31f4c332531977b89beb5"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[package.extras] -dev = ["py-make (>=0.1.0)", "twine", "wheel"] -notebook = ["ipywidgets (>=6)"] -slack = ["slack-sdk"] -telegram = ["requests"] - -[[package]] -name = "xdg" -version = "6.0.0" -description = "Variables defined by the XDG Base Directory Specification" -category = "main" -optional = false -python-versions = ">=3.7,<4.0" -files = [ - {file = "xdg-6.0.0-py3-none-any.whl", hash = "sha256:df3510755b4395157fc04fc3b02467c777f3b3ca383257397f09ab0d4c16f936"}, - {file = "xdg-6.0.0.tar.gz", hash = "sha256:24278094f2d45e846d1eb28a2ebb92d7b67fc0cab5249ee3ce88c95f649a1c92"}, -] - -[metadata] -lock-version = "2.0" -python-versions = ">=3.10.0,<3.12" -content-hash = "3c6b538852447a8f3ae34e1be122716d47e669a2b44f7c5d3d850e5d877353c7" diff --git a/modules/borgcopy/pyproject.toml b/modules/borgcopy/pyproject.toml index f3401ed2..d76d73c6 100644 --- a/modules/borgcopy/pyproject.toml +++ b/modules/borgcopy/pyproject.toml @@ -1,22 +1,25 @@ -[tool.poetry] +[project] name = "copy_borg" version = "0.0.0" -authors = ["Gregor Kleen "] description = "" +authors = [{ name = "Gregor Kleen", email = "gkleen@yggdrasil.li" }] +requires-python = "~=3.12" +dependencies = [ + "humanize>=4.6.0,<5", + "tqdm>=4.65.0,<5", + "python-dateutil>=2.8.2,<3", + "xdg>=6.0.0,<7", + "pyprctl>=0.1.3,<0.2", + "halo>=0.0.31,<0.0.32", + "unshare>=0.22", +] -[tool.poetry.scripts] +[project.scripts] copy_borg = "copy_borg.__main__:main" -[tool.poetry.dependencies] -python = ">=3.10.0,<3.12" -humanize = "^4.6.0" -tqdm = "^4.65.0" -python-dateutil = "^2.8.2" -xdg = "^6.0.0" -python-unshare = "^0.2" -pyprctl = "^0.1.3" -halo = "^0.0.31" - [build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" \ No newline at end of file +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["copy_borg"] diff --git a/modules/borgcopy/uv.lock b/modules/borgcopy/uv.lock new file mode 100644 index 00000000..1a282598 --- /dev/null +++ b/modules/borgcopy/uv.lock @@ -0,0 +1,146 @@ +version = 1 +revision = 2 +requires-python = ">=3.12, <4" + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "copy-borg" +version = "0.0.0" +source = { editable = "." } +dependencies = [ + { name = "halo" }, + { name = "humanize" }, + { name = "pyprctl" }, + { name = "python-dateutil" }, + { name = "tqdm" }, + { name = "unshare" }, + { name = "xdg" }, +] + +[package.metadata] +requires-dist = [ + { name = "halo", specifier = ">=0.0.31,<0.0.32" }, + { name = "humanize", specifier = ">=4.6.0,<5" }, + { name = "pyprctl", specifier = ">=0.1.3,<0.2" }, + { name = "python-dateutil", specifier = ">=2.8.2,<3" }, + { name = "tqdm", specifier = ">=4.65.0,<5" }, + { name = "unshare", specifier = ">=0.22" }, + { name = "xdg", specifier = ">=6.0.0,<7" }, +] + +[[package]] +name = "halo" +version = "0.0.31" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama" }, + { name = "log-symbols" }, + { name = "six" }, + { name = "spinners" }, + { name = "termcolor" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ee/48/d53580d30b1fabf25d0d1fcc3f5b26d08d2ac75a1890ff6d262f9f027436/halo-0.0.31.tar.gz", hash = "sha256:7b67a3521ee91d53b7152d4ee3452811e1d2a6321975137762eb3d70063cc9d6", size = 11666, upload-time = "2020-11-10T02:36:48.335Z" } + +[[package]] +name = "humanize" +version = "4.12.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/22/d1/bbc4d251187a43f69844f7fd8941426549bbe4723e8ff0a7441796b0789f/humanize-4.12.3.tar.gz", hash = "sha256:8430be3a615106fdfceb0b2c1b41c4c98c6b0fc5cc59663a5539b111dd325fb0", size = 80514, upload-time = "2025-04-30T11:51:07.98Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/1e/62a2ec3104394a2975a2629eec89276ede9dbe717092f6966fcf963e1bf0/humanize-4.12.3-py3-none-any.whl", hash = "sha256:2cbf6370af06568fa6d2da77c86edb7886f3160ecd19ee1ffef07979efc597f6", size = 128487, upload-time = "2025-04-30T11:51:06.468Z" }, +] + +[[package]] +name = "log-symbols" +version = "0.0.14" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/45/87/e86645d758a4401c8c81914b6a88470634d1785c9ad09823fa4a1bd89250/log_symbols-0.0.14.tar.gz", hash = "sha256:cf0bbc6fe1a8e53f0d174a716bc625c4f87043cc21eb55dd8a740cfe22680556", size = 3211, upload-time = "2019-08-08T06:32:22.538Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/28/5d/d710c38be68b0fb54e645048fe359c3904cc3cb64b2de9d40e1712bf110c/log_symbols-0.0.14-py3-none-any.whl", hash = "sha256:4952106ff8b605ab7d5081dd2c7e6ca7374584eff7086f499c06edd1ce56dcca", size = 3081, upload-time = "2019-08-08T06:32:20.604Z" }, +] + +[[package]] +name = "pyprctl" +version = "0.1.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c9/16/6ed71ebcad76c1cd5f22185bcc6b31c0ee62fc5e693b626febea8fedeba3/pyprctl-0.1.3.tar.gz", hash = "sha256:1fb54d3ab030ec02e4afc38fb9662d6634c12834e91ae7959de56a9c09f69c26", size = 18739, upload-time = "2021-10-26T23:52:03.87Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bf/5e/62765de39bbce8111fb1f4453a4a804913bf49179fa265fb713ed66c9d15/pyprctl-0.1.3-py3-none-any.whl", hash = "sha256:6302e5114f078fb33e5799835d0a69e2fc180bb6b28ad073515fa40c5272f1dd", size = 20016, upload-time = "2021-10-26T23:52:02.986Z" }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + +[[package]] +name = "spinners" +version = "0.0.24" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d3/91/bb331f0a43e04d950a710f402a0986a54147a35818df0e1658551c8d12e1/spinners-0.0.24.tar.gz", hash = "sha256:1eb6aeb4781d72ab42ed8a01dcf20f3002bf50740d7154d12fb8c9769bf9e27f", size = 5308, upload-time = "2020-02-19T21:42:32.326Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9f/8e/3310207a68118000ca27ac878b8386123628b335ecb3d4bec4743357f0d1/spinners-0.0.24-py3-none-any.whl", hash = "sha256:2fa30d0b72c9650ad12bbe031c9943b8d441e41b4f5602b0ec977a19f3290e98", size = 5499, upload-time = "2020-02-19T21:42:30.876Z" }, +] + +[[package]] +name = "termcolor" +version = "3.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ca/6c/3d75c196ac07ac8749600b60b03f4f6094d54e132c4d94ebac6ee0e0add0/termcolor-3.1.0.tar.gz", hash = "sha256:6a6dd7fbee581909eeec6a756cff1d7f7c376063b14e4a298dc4980309e55970", size = 14324, upload-time = "2025-04-30T11:37:53.791Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/bd/de8d508070629b6d84a30d01d57e4a65c69aa7f5abe7560b8fad3b50ea59/termcolor-3.1.0-py3-none-any.whl", hash = "sha256:591dd26b5c2ce03b9e43f391264626557873ce1d379019786f99b0c2bee140aa", size = 7684, upload-time = "2025-04-30T11:37:52.382Z" }, +] + +[[package]] +name = "tqdm" +version = "4.67.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737, upload-time = "2024-11-24T20:12:22.481Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl", hash = "sha256:26445eca388f82e72884e0d580d5464cd801a3ea01e63e5601bdff9ba6a48de2", size = 78540, upload-time = "2024-11-24T20:12:19.698Z" }, +] + +[[package]] +name = "unshare" +version = "0.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/15/85/2ba218129c95b894efe87506489b525f859c40f6e21cb0521ff3cec754f4/unshare-0.22.tar.gz", hash = "sha256:d521d72cca6e876f22cbd5ff5eb51f1beef75e8f9c53b599b55fa05fba1dd3a6", size = 2041, upload-time = "2019-10-17T12:58:31.498Z" } + +[[package]] +name = "xdg" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/b9/0e6e6f19fb75cf5e1758f4f33c1256738f718966700cffc0fde2f966218b/xdg-6.0.0.tar.gz", hash = "sha256:24278094f2d45e846d1eb28a2ebb92d7b67fc0cab5249ee3ce88c95f649a1c92", size = 3453, upload-time = "2023-02-27T19:27:44.309Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/dd/54/3516c1cf349060fc3578686d271eba242f10ec00b4530c2985af9faac49b/xdg-6.0.0-py3-none-any.whl", hash = "sha256:df3510755b4395157fc04fc3b02467c777f3b3ca383257397f09ab0d4c16f936", size = 3855, upload-time = "2023-02-27T19:27:42.151Z" }, +] diff --git a/modules/llvm_kernel.nix b/modules/llvm_kernel.nix new file mode 100644 index 00000000..71d96320 --- /dev/null +++ b/modules/llvm_kernel.nix @@ -0,0 +1,59 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.boot.kernel.llvm; +in { + options = { + boot.kernel.llvm = { + enable = lib.mkEnableOption "building linux kernel with clang/LLVM" // { + default = true; + }; + + kernel = lib.mkPackageOption pkgs [ "linuxKernel" "kernels" "linux_default" ] {}; + }; + }; + + config = lib.mkIf cfg.enable { + boot.kernelPackages = + with pkgs; # Cut down on repeated `pkgs.` declarations + let + # Choose whichever LLVM version you please. `llvmPackages` is the + # default version, `llvmPackages_latest` is the latest (at the time of + # writing, LLVM 17.0.6 and 18.1.8 respectively). + llvm = llvmPackages_latest; + # Same deal as LLVM; choose whichever kernel version you like. + # `linux` is the latest LTS, `linux_latest` is the latest stable. + inherit (cfg) kernel; + in + # Generate kernel modules for our custom kernel. + linuxPackagesFor ( + # Override our chosen kernel version with our custom settings. + (kernel.override { + # Set our chosen version of LLVM as our standard environment. + stdenv = overrideCC llvm.stdenv ( + # Tell our C compiler (Clang) to use LLVM bintools--normally GNU + # binutils are used even with Clang as the compiler. + llvm.stdenv.cc.override { + bintools = llvm.bintools; + } + ); + + # Tell Linux that we're compiling with Clang and LLVM. + extraMakeFlags = [ "LLVM=1" ]; + + # If you'd like to edit your kernel configuration, use + # `structuredExtraConfig`. For example, some options available to us + # when compiling with Clang and linking with LLD: + structuredExtraConfig = { + CFI_CLANG = lib.kernel.yes; + # LTO_CLANG_THIN = lib.kernel.yes; + }; + } + ).overrideAttrs + # Work around another NixOS specific issue where builds with WERROR=y + # are stopped by a benign error. See reference 1 below for details. + # Technically, this fix is only necessary with WERROR=y but the issue + # still causes a warning on builds where WERROR is unset. + { env.NIX_CFLAGS_COMPILE = "-Wno-unused-command-line-argument"; } + ); + }; +} diff --git a/overlays/prometheus-lvm-exporter.nix b/overlays/prometheus-lvm-exporter.nix index 240f8d85..b0230b63 100644 --- a/overlays/prometheus-lvm-exporter.nix +++ b/overlays/prometheus-lvm-exporter.nix @@ -3,7 +3,7 @@ pname = "prometheus-lvm-exporter"; inherit (sources.prometheus-lvm-exporter) version src; - vendorHash = "sha256-z/fV0PzoWSDTJ44En19o7zJPPPox5ymFw7sw0Ab9t00="; + vendorHash = "sha256-5H99RpUV3QV1hithBN7ztJlZdBi+SlaKegga8jDs0AM="; doCheck = false; diff --git a/system-profiles/core/default.nix b/system-profiles/core/default.nix index 229a007e..e5f9dc16 100644 --- a/system-profiles/core/default.nix +++ b/system-profiles/core/default.nix @@ -180,13 +180,7 @@ in { }; environment.systemPackages = with pkgs; [ git-annex scutiger ]; } - ] ++ (optional (options ? system.switch.enableNg) { - system.switch = lib.mkDefault { - enable = false; - enableNg = true; - }; - }) - ++ (optional (options ? system.rebuild.enableNg) { + ] ++ (optional (options ? system.rebuild.enableNg) { system.rebuild.enableNg = lib.mkDefault true; }) ++ (optional (options ? services.userborn) { diff --git a/system-profiles/nfsroot.nix b/system-profiles/nfsroot.nix index b0116d61..12d5d2b4 100644 --- a/system-profiles/nfsroot.nix +++ b/system-profiles/nfsroot.nix @@ -1,4 +1,4 @@ -{ config, options, pkgs, lib, flake, flakeInputs, ... }: +{ config, options, pkgs, lib, flake, ... }: with lib; diff --git a/system-profiles/zfs.nix b/system-profiles/zfs.nix index a93dddd2..f3147f9e 100644 --- a/system-profiles/zfs.nix +++ b/system-profiles/zfs.nix @@ -1,7 +1,8 @@ -{ pkgs, lib, ... } : { +{ config, pkgs, lib, ... } : { config = { boot = { - kernelPackages = pkgs.linuxPackages_6_12; + kernelPackages = lib.mkIf (!config.boot.kernel.llvm.enable) pkgs.linuxPackages_6_12; + kernel.llvm.kernel = lib.mkIf config.boot.kernel.llvm.enable pkgs.linux_6_12; zfs.package = pkgs.zfs_2_3; supportedFilesystems.zfs = true; diff --git a/user-profiles/yt-dlp.nix b/user-profiles/yt-dlp.nix index ef0be87e..5c9858a6 100644 --- a/user-profiles/yt-dlp.nix +++ b/user-profiles/yt-dlp.nix @@ -13,11 +13,12 @@ "best" ]; embed-subs = true; + embed-thumbnail = true; + embed-metadata = true; # write-subs = true; write-auto-subs = true; sub-langs = "en(-(gb|us|orig))?,de(-(de|orig))?,-live_chat,-rechat"; prefer-free-formats = true; - embed-metadata = true; # downloader = "${pkgs.axel}/bin/axel"; concurrent-fragments = 12; buffer-size = "16K"; @@ -29,6 +30,7 @@ # ]; remux-video = "mp4>mkv"; output = lib.mkDefault "\"%(modified_date>%Y%m%d,release_date>%Y%m%d,upload_date>%Y%m%d)s %(title)s [%(uploader)s %(webpage_url)s].%(ext)s\""; + audio-multistreams = true; }; }; }; -- cgit v1.2.3