zaphyra's git: nixfiles

zaphyra's nixfiles

commit 16d91d5d51c8d9d3fdd227a75189bd11abd90a94
parent d5814f32ec8c92cab339f1ede6dfdf538fb4d556
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Wed, 27 May 2026 19:31:48 +0200

npins: update to nixpkgs 26.05
14 files changed, 110 insertions(+), 164 deletions(-)
diff --git a/default.nix b/default.nix
@@ -15,6 +15,7 @@ in
 {
 
   inherit
+    npins
     overlays
     nixosConfigurations
     ;

@@ -23,7 +24,7 @@ in
 
   formatter = lib.zpha.forAllSystems {
     inherit (npins) nixpkgs;
-    body = pkgs: pkgs.nixfmt-rfc-style;
+    body = pkgs: pkgs.nixfmt;
   };
 
   packages = lib.zpha.forAllSystems {
diff --git a/machines/cuvier.nix b/machines/cuvier.nix
@@ -73,6 +73,7 @@
       fileSystems = {
         "/mnt/music" = {
           device = "/dev/mapper/data";
+          fsType = "btrfs";
           options = [
             "subvol=music"
             "compress=zstd"

@@ -81,6 +82,7 @@
         };
         "/mnt/syncthing" = {
           device = "/dev/mapper/data";
+          fsType = "btrfs";
           options = [
             "subvol=syncthing"
             "compress=zstd"

@@ -89,6 +91,7 @@
         };
         "/mnt/restic" = {
           device = "/dev/mapper/backup";
+          fsType = "btrfs";
           options = [
             "subvol=restic"
             "discard=async"
diff --git a/nixosModules/common/configure/rootDisk.nix b/nixosModules/common/configure/rootDisk.nix
@@ -59,7 +59,7 @@ in
 
   config = lib.mkIf cfg.enable (
     let
-      askPass = pkgs.writeShellScriptBin "cryptsetup-askpass" "systemctl default";
+      askPass = pkgs.writeShellScriptBin "askpass" "systemctl default";
     in
     {
       boot = {

@@ -75,8 +75,8 @@ in
           systemd = {
             enable = lib.mkDefault true;
             network = lib.mkIf config.systemd.network.enable config.systemd.network;
-            storePaths = [ "${askPass}/bin/cryptsetup-askpass" ];
-            users.root.shell = "${askPass}/bin/cryptsetup-askpass";
+            storePaths = [ "${askPass}/bin/askpass" ];
+            users.root.shell = "${askPass}/bin/askpass";
           };
 
           network = {

@@ -106,7 +106,9 @@ in
           "/" = {
             device = "/dev/mapper/root";
             fsType = "btrfs";
-            options = partOpts;
+            options = partOpts ++ [
+              "x-systemd.device-timeout=infinity"
+            ];
           };
           "/boot" = {
             device = "/dev/disk/by-partlabel/${config.networking.hostName}-boot";
diff --git a/nixosModules/common/programs/nixUtilities.nix b/nixosModules/common/programs/nixUtilities.nix
@@ -12,7 +12,7 @@
   config = lib.mkIf config.common.programs.nixUtilities.enable {
     environment.systemPackages = with pkgs; [
       deadnix
-      nixfmt-rfc-style
+      nixfmt
       nixfmt-tree
       nixd
       statix
diff --git a/nixosModules/zpha/configure/mailServer.nix b/nixosModules/zpha/configure/mailServer.nix
@@ -103,7 +103,7 @@
             subdomains = {
               autoconfig.CNAME = [ "${hostName}." ];
               _dmarc.TXT = [ DMARC ];
-              "${config.mailserver.dkimSelector}._domainkey".TXT = [
+              "${config.mailserver.dkim.defaults.selector}._domainkey".TXT = [
                 primaryDomainDkimKey
               ];
             };

@@ -114,7 +114,7 @@
 
           subdomains = {
             _dmarc.TXT = [ DMARC ];
-            "${config.mailserver.dkimSelector}._domainkey".TXT = [ dkimKey ];
+            "${config.mailserver.dkim.defaults.selector}._domainkey".TXT = [ dkimKey ];
           };
         }) extraDomains);
 

@@ -170,12 +170,6 @@
             user = "rspamd";
             group = "rspamd";
           }
-          {
-            directory = "/var/lib/sieve";
-            mode = "0770";
-            user = "virtualMail";
-            group = "virtualMail";
-          }
         ];
 
         services.resticBackup.mailserver = {

@@ -186,15 +180,14 @@
           paths = [
             "/var/lib/mailboxes"
             "/var/lib/dkimKeys"
-            "/var/lib/sieve"
           ];
         };
       };
 
       services = {
-        dovecot2 = {
-          pluginSettings.sieve_global = "/etc/dovecot/sieve";
-          sieve.extensions = [ "editheader" ];
+        dovecot2.settings = {
+          "sieve_script global".path = "/etc/dovecot/sieve";
+          sieve_extensions.editheader = true;
         };
         nginx.virtualHosts."autoconfig.${primaryDomain}" = {
           useACMEHost = "${config.networking.fqdn}";

@@ -205,13 +198,13 @@
 
       mailserver = {
         enable = true;
-        stateVersion = 3;
+        stateVersion = 5;
 
         openFirewall = true;
         localDnsResolver = false;
         virusScanning = false;
 
-        certificateScheme = "acme";
+        x509.useACMEHost = config.networking.fqdn;
 
         enableManageSieve = true;
         enableSubmission = true;

@@ -224,10 +217,9 @@
         fullTextSearch.enable = true;
         dmarcReporting.enable = true;
 
+        storage.path = "/var/lib/mailboxes";
+        dkim.keyDirectory = "/var/lib/dkimKeys";
         indexDir = "/var/lib/dovecot/indices";
-        mailDirectory = "/var/lib/mailboxes";
-        sieveDirectory = "/var/lib/sieve";
-        dkimKeyDirectory = "/var/lib/dkimKeys";
 
         fqdn = hostName;
         systemDomain = primaryDomain;

@@ -235,7 +227,7 @@
 
         domains = [ primaryDomain ] ++ (lib.attrNames extraDomains);
 
-        loginAccounts = {
+        accounts = {
           "katja@zaphyra.eu" = {
             hashedPasswordFile = config.sops.secrets."mailPasswords/katja@zaphyra.eu".path;
             sieveScript = ''
diff --git a/nixosModules/zpha/profiles/dn42.nix b/nixosModules/zpha/profiles/dn42.nix
@@ -55,7 +55,7 @@ in
 
     services.resolved = {
       enable = true;
-      fallbackDns = [
+      settings.Resolve.FallbackDNS = [
         "8.8.8.8"
         "2001:4860:4860::8844"
       ];
diff --git a/nixosModules/zpha/programs/nixUtilities.nix b/nixosModules/zpha/programs/nixUtilities.nix
@@ -12,7 +12,7 @@
   config = lib.mkIf config.zpha.programs.nixUtilities.enable {
     users.users.zaphyra.maid.packages = with pkgs; [
       unstable.npins
-      nixfmt-rfc-style
+      nixfmt
       nixfmt-tree
       nixd
       statix

@@ -24,7 +24,7 @@
       command = lib.getExe pkgs.nixd;
       options = {
         config = builtins.toJSON {
-          formatting.command = [ (lib.getExe pkgs.nixfmt-rfc-style) ];
+          formatting.command = [ (lib.getExe pkgs.nixfmt) ];
         };
       };
     };
diff --git a/nixosModules/zpha/programs/swaylock.nix b/nixosModules/zpha/programs/swaylock.nix
@@ -49,7 +49,7 @@ in
     services.systemd-lock-handler.enable = true;
 
     users.users.zaphyra.maid = {
-      packages = [ pkgs.pkgs.swaylock-plugin-fprintd ];
+      packages = [ pkgs.pkgs.swaylock-plugin ];
 
       file.xdg_config = {
         "swaylock/config".text = lib.concatStrings (

@@ -70,7 +70,7 @@ in
         environment = lib.mkForce { };
         unitConfig.OnSuccess = [ "unlock.target" ];
         serviceConfig = {
-          ExecStart = lib.getExe pkgs.swaylock-plugin-fprintd;
+          ExecStart = lib.getExe pkgs.swaylock-plugin;
           Restart = "on-failure";
           RestartSec = 0;
         };
diff --git a/nixosModules/zpha/websites/music.zaphyra.eu.nix b/nixosModules/zpha/websites/music.zaphyra.eu.nix
@@ -33,6 +33,7 @@ in
           isNormalUser = true;
           createHome = true;
           home = "/mnt/music/piegames";
+          uid = 1003;
           group = "navidrome";
           extraGroups = [ "ssh" ];
           openssh.authorizedKeys.keys = config.users.users.zaphyra.openssh.authorizedKeys.keys ++ [

@@ -150,10 +151,13 @@ in
 
       navidrome = {
         enable = true;
+        package = pkgs.unstable.navidrome;
+        plugins = with pkgs; [
+          navidromePlugins.apple-music
+          zpha.audiomuseai-navidrome-plugin
+        ];
+
         environmentFile = config.sops.secrets."environments/navidrome".path;
-        package = pkgs.unstable.navidrome.overrideAttrs {
-          CGO_CFLAGS_ALLOW = ".*--define-prefix.*";
-        };
         settings = {
           Address = "0.0.0.0";
           BaseUrl = "https://${cfg.subdomain}.zaphyra.eu";

@@ -170,7 +174,7 @@ in
           ImageCacheSize = "2GB";
           TranscodingCacheSize = "10GB";
           UIWelcomeMessage = "sailing on pcm waves";
-          Agents = "audiomuseai,lastfm,spotify,deezer";
+          Agents = "audiomuseai,apple-music,lastfm,spotify,deezer";
           Backup = {
             Path = "/var/lib/navidrome/backup";
             Count = 2;

@@ -178,8 +182,6 @@ in
           };
           Plugins = {
             Enabled = true;
-            Folder = "/var/lib/navidrome/plugins"; # Optional: custom plugins folder
-            AutoReload = true; # Useful during development/testing
             LogLevel = "debug"; # Enable detailed plugin logging
             CacheSize = "200MB";
           };
diff --git a/nixosModules/zpha/websites/notes.zaphyra.eu.nix b/nixosModules/zpha/websites/notes.zaphyra.eu.nix
@@ -41,7 +41,6 @@
     services = {
       memos = {
         enable = true;
-        package = pkgs.zpha.memos;
         settings = {
           MEMOS_MODE = "prod";
           MEMOS_DATA = config.services.memos.dataDir;
diff --git a/npins/sources.json b/npins/sources.json
@@ -40,10 +40,10 @@
       "version_upper_bound": null,
       "release_prefix": null,
       "submodules": false,
-      "version": "v149.1",
-      "revision": "59464fcbe0ffbb15ef2114d4941c71b51005a585",
-      "url": "https://api.github.com/repos/rafaelmardojai/firefox-gnome-theme/tarball/refs/tags/v149.1",
-      "hash": "sha256-QFY6Eu0kmaWl8W76bXs5K2BVtTh+Md+1rGba1WiTYxU="
+      "version": "v150",
+      "revision": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9",
+      "url": "https://api.github.com/repos/rafaelmardojai/firefox-gnome-theme/tarball/refs/tags/v150",
+      "hash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o="
     },
     "flauschehornSexy": {
       "type": "Git",

@@ -136,9 +136,9 @@
       },
       "branch": "main",
       "submodules": false,
-      "revision": "0a5220500f2764422278f07f29576731e85b1d6c",
-      "url": "https://codeberg.org/BANanaD3V/niri-nix/archive/0a5220500f2764422278f07f29576731e85b1d6c.tar.gz",
-      "hash": "sha256-VACAF2i/81+d6NPO/WYpAgv0aD+hhctm1uYRsioALgc="
+      "revision": "06ecf24d15ec95ef9c8bc2a08d366b0fc68adbec",
+      "url": "https://codeberg.org/BANanaD3V/niri-nix/archive/06ecf24d15ec95ef9c8bc2a08d366b0fc68adbec.tar.gz",
+      "hash": "sha256-I/sw4t/ZiAkErPzrEHoN3Gi4oh5o/omD50Qu4mQXuN0="
     },
     "nixMaid": {
       "type": "Git",

@@ -175,9 +175,9 @@
       },
       "branch": "master",
       "submodules": false,
-      "revision": "8792fab9d4a6454a9201675f01326f827ce35ead",
-      "url": "https://github.com/NixOS/nixos-hardware/archive/8792fab9d4a6454a9201675f01326f827ce35ead.tar.gz",
-      "hash": "sha256-u73aVD/lUmmT3JV+kPDztl7zPwQKd0eobD1AbJltaGs="
+      "revision": "ef4efb84766a166c906bd55759574676bf91267c",
+      "url": "https://github.com/NixOS/nixos-hardware/archive/ef4efb84766a166c906bd55759574676bf91267c.tar.gz",
+      "hash": "sha256-3sRzgLX86qV5NlhWUAufLmHwkyP03tmL3VdZIM13dEo="
     },
     "nixpkgs": {
       "type": "Git",

@@ -186,11 +186,11 @@
         "owner": "NixOS",
         "repo": "nixpkgs"
       },
-      "branch": "nixos-25.11",
+      "branch": "nixos-26.05",
       "submodules": false,
-      "revision": "d7a713c0b7e47c908258e71cba7a2d77cc8d71d5",
-      "url": "https://github.com/NixOS/nixpkgs/archive/d7a713c0b7e47c908258e71cba7a2d77cc8d71d5.tar.gz",
-      "hash": "sha256-6xWoytx8jFW4PF1GjRm/i/53trbpKGfz6zjzQGBr4cI="
+      "revision": "705e9929918b43bd7b715dc0a878ac870449bb03",
+      "url": "https://github.com/NixOS/nixpkgs/archive/705e9929918b43bd7b715dc0a878ac870449bb03.tar.gz",
+      "hash": "sha256-ViA62qtL5za7V3d5I8OA9q9JcFhsVAiL5jVHwEclWqk="
     },
     "nixpkgsUnstable": {
       "type": "Git",

@@ -201,9 +201,9 @@
       },
       "branch": "master",
       "submodules": false,
-      "revision": "f04d3629e8772518f1005264b1a43a755fbcaaee",
-      "url": "https://github.com/NixOS/nixpkgs/archive/f04d3629e8772518f1005264b1a43a755fbcaaee.tar.gz",
-      "hash": "sha256-4q5WptkoeNJDsSWbzWxShJdSgL/QgZBu//+PqEsnm9A="
+      "revision": "e7c036921ff981ff19094e8cc01c985d8d3e4213",
+      "url": "https://github.com/NixOS/nixpkgs/archive/e7c036921ff981ff19094e8cc01c985d8d3e4213.tar.gz",
+      "hash": "sha256-I3E/0eEHfgelhJvUOmTec9oIZS1VPSoHQHUcbnhujUQ="
     },
     "oeffisearch": {
       "type": "Git",

@@ -213,9 +213,9 @@
       },
       "branch": "main",
       "submodules": false,
-      "revision": "8b2131d7c60846394b735c28b968536236283709",
+      "revision": "4ce4b5dde53c51f46a84d58a04b9ebca27d7343e",
       "url": null,
-      "hash": "sha256-aV01KT7uhiZ4oYzOZ4BROEvlw30isFZ5ujJSppQUOTM="
+      "hash": "sha256-r4dt75JcoqENvlHM8lfbVv98S5p1dk9mvmtUsg9oMTM="
     },
     "preservation": {
       "type": "Git",

@@ -237,11 +237,11 @@
         "repo_path": "simple-nixos-mailserver/nixos-mailserver",
         "server": "https://gitlab.com/"
       },
-      "branch": "nixos-25.11",
+      "branch": "nixos-26.05",
       "submodules": false,
-      "revision": "25e6dbb8fca3b6e779c5a46fd03bd760b2165bb5",
-      "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=25e6dbb8fca3b6e779c5a46fd03bd760b2165bb5",
-      "hash": "sha256-QHzRqq6gh+t3F/QU9DkP7X63dDDcuIQmaDz12p7ANTg="
+      "revision": "6c11ff592ef0dce8f1cc2fd870a6d61bd9133afa",
+      "url": "https://gitlab.com/api/v4/projects/simple-nixos-mailserver%2Fnixos-mailserver/repository/archive.tar.gz?sha=6c11ff592ef0dce8f1cc2fd870a6d61bd9133afa",
+      "hash": "sha256-lUmq8sXQzihreq9UMqAkSBy9z9ueZbRnFyltzYVfQ2I="
     },
     "sopsNix": {
       "type": "Git",
diff --git a/packages/audiomuseai-navidrome-plugin/package.nix b/packages/audiomuseai-navidrome-plugin/package.nix
@@ -0,0 +1,26 @@
+{
+  lib,
+  pkgs,
+  buildNavidromePlugin,
+}:
+
+buildNavidromePlugin rec {
+  pname = "audiomuseai-navidrome-plugin";
+  version = "8";
+
+  src = pkgs.fetchFromGitHub {
+    owner = "NeptuneHub";
+    repo = "AudioMuse-AI-NV-plugin";
+    tag = "v${version}";
+    hash = "sha256-WyobjyadD9IcY6mFYhCmuQgLbnoHpDoiLfINNfKmQM8=";
+  };
+
+  vendorHash = "sha256-mXes+doBSa5kcfHp1cuzTz30wnyyPN7NLC0iOSL8FDo=";
+
+  meta = {
+    description = "AudioMuse-AI Navidrome Plugin enhances music discovery by using sonic analysis to queue similar songs in real time.";
+    homepage = "https://github.com/NeptuneHub/AudioMuse-AI-NV-plugin";
+    license = lib.licenses.gpl3Only;
+    sourceProvenance = with lib.sourceTypes; [ fromSource ];
+  };
+}
diff --git a/packages/gotosocial-unstable/package.nix b/packages/gotosocial-unstable/package.nix
@@ -1,9 +1,14 @@
 {
+  stdenv,
   unstable,
   lib,
   fetchFromGitea,
   applyPatches,
-  mkYarnPackage,
+  fetchYarnDeps,
+  yarnConfigHook,
+  yarnBuildHook,
+  yarnInstallHook,
+  nodejs,
   makeWrapper,
   installShellFiles,
   nixosTests,

@@ -29,39 +34,34 @@ unstable.buildGoModule (finalAttrs: {
     ];
   };
 
-  frontend-assets = mkYarnPackage {
+  frontend-assets = stdenv.mkDerivation {
     name = "${finalAttrs.pname}-${finalAttrs.version}-frontendAssets";
-    inherit (finalAttrs) src version;
+    inherit (finalAttrs) version;
 
-    packageJSON = "${finalAttrs.src}/web/source/package.json";
-    yarnLock = "${finalAttrs.src}/web/source/yarn.lock";
+    src = "${finalAttrs.src}/web";
 
-    configurePhase = ''
-      runHook preConfigure
-
-      cp -r $node_modules node_modules
-      chmod +w -R node_modules
-
-      runHook postConfigure
-    '';
-
-    buildPhase = ''
-      runHook preBuild
+    yarnOfflineCache = fetchYarnDeps {
+      yarnLock = "${finalAttrs.src}/web/source/yarn.lock";
+      hash = "sha256-rfZxslIEoOTufENIvk8Eq5wzdD3rUpUP3wrMjmLH44k=";
+    };
 
-      mkdir -p ./web/source ./web/assets
+    nativeBuildInputs = [
+      yarnConfigHook
+      yarnBuildHook
+      yarnInstallHook
+      nodejs
+    ];
 
-      cp -r $src/web/source/. ./web/source
-      cp -r $src/web/assets/. ./web/assets
+    postPatch = ''
+      mkdir -p ./source ./assets
 
-      export NODE_OPTIONS=--openssl-legacy-provider
-      node ./node_modules/ts-patch/bin/ts-patch.js install
-      yarn --offline --cwd ./web/source build
+      cp -r $src/source/. ./source
+      cp -r $src/assets/. ./assets
 
-      runHook postBuild
+      cd ./source
     '';
 
-    distPhase = "true";
-    installPhase = "cp -r ./web/assets $out";
+    installPhase = "cp -r ../assets $out";
 
     meta.license = lib.licenses.agpl3Only;
   };

@@ -72,6 +72,7 @@ unstable.buildGoModule (finalAttrs: {
     "-X 'main.Commit=${finalAttrs.rev}'"
     "-X 'main.Version=${finalAttrs.version}'"
   ];
+
   tags = [
     "netgo"
     "osusergo"
diff --git a/packages/memos/package.nix b/packages/memos/package.nix
@@ -1,80 +0,0 @@
-{
-  fetchFromGitHub,
-  buildGoModule,
-  stdenvNoCC,
-  nix-update-script,
-  nodejs,
-  lib,
-  fetchPnpmDeps,
-  pnpmConfigHook,
-  pnpm,
-}:
-let
-  version = "0.26.0";
-  src = fetchFromGitHub {
-    owner = "usememos";
-    repo = "memos";
-    rev = "v${version}";
-    hash = "sha256-3Q+acA1MjPlWMpRHpkNsg7CVc2DrBosfg4JC115OXMQ=";
-  };
-
-  memos-web = stdenvNoCC.mkDerivation (finalAttrs: {
-    pname = "memos-web";
-    inherit version src;
-    pnpmDeps = fetchPnpmDeps {
-      inherit (finalAttrs) pname version src;
-      sourceRoot = "${finalAttrs.src.name}/web";
-      fetcherVersion = 1;
-      hash = "sha256-6lrXpblVY7Q7UMMU0obVAwACodW+WJm/INiSMPzEgEI=";
-    };
-    pnpmRoot = "web";
-    nativeBuildInputs = [
-      nodejs
-      pnpmConfigHook
-      pnpm
-    ];
-    buildPhase = ''
-      runHook preBuild
-      pnpm -C web build
-      runHook postBuild
-    '';
-    installPhase = ''
-      runHook preInstall
-      cp -r web/dist $out
-      runHook postInstall
-    '';
-  });
-in
-buildGoModule {
-  pname = "memos";
-  inherit
-    version
-    src
-    memos-web
-    ;
-
-  vendorHash = "sha256-J/qsybKA+RIKQKaHmAtTcHt6z5VnFpWqFT0dF7AceWQ=";
-
-  doCheck = false;
-
-  preBuild = ''
-    rm -rf server/router/frontend/dist
-    cp -r ${memos-web} server/router/frontend/dist
-  '';
-
-  passthru.updateScript = nix-update-script {
-    extraArgs = [
-      "--subpackage"
-      "memos-web"
-    ];
-  };
-
-  meta = {
-    homepage = "https://usememos.com";
-    description = "Lightweight, self-hosted memo hub";
-    changelog = "https://github.com/usememos/memos/releases/tag/${src.rev}";
-    license = lib.licenses.mit;
-    mainProgram = "memos";
-    maintainers = with lib.maintainers; [ zaphyra ];
-  };
-}