From d54e653a2bf3c1079271c55e0c91cd39244ed9b9 Mon Sep 17 00:00:00 2001 From: Henri Dohmen Date: Sat, 4 Apr 2026 14:20:30 +0200 Subject: [PATCH] Fix test-vm flake check & minor improvements --- host/roam/firefox-sync.nix | 1 - host/test-vm/default.nix | 6 ++++++ mod/desktop/network.nix | 1 - mod/syncthing.nix | 4 ++-- secrets.nix | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/host/roam/firefox-sync.nix b/host/roam/firefox-sync.nix index 8d20865..4e8df52 100644 --- a/host/roam/firefox-sync.nix +++ b/host/roam/firefox-sync.nix @@ -1,6 +1,5 @@ { pkgs, - pkgs_25-05, config, secrets, ... diff --git a/host/test-vm/default.nix b/host/test-vm/default.nix index 43a7de8..84dbaa3 100644 --- a/host/test-vm/default.nix +++ b/host/test-vm/default.nix @@ -19,6 +19,12 @@ users.root.hashedPassword = "!"; }; + fileSystems."/" = { + device = "/dev/vda1"; + fsType = "ext4"; + }; + swapDevices = [ ]; + boot = { loader = { efi.canTouchEfiVariables = true; diff --git a/mod/desktop/network.nix b/mod/desktop/network.nix index cd4cc32..9f50eaa 100644 --- a/mod/desktop/network.nix +++ b/mod/desktop/network.nix @@ -1,6 +1,5 @@ { config, - host, lib, pkgs, var, diff --git a/mod/syncthing.nix b/mod/syncthing.nix index 2422907..19283b0 100644 --- a/mod/syncthing.nix +++ b/mod/syncthing.nix @@ -9,7 +9,7 @@ let cfg = config.services.syncthing; this = config.networking.hostName; - is-managed = var.syncthing.managed ? ${this}; + is-managed = lib.hasAttr this var.syncthing.managed; is-server = this == "roam"; folders = { @@ -61,6 +61,6 @@ in devices = var.syncthing.devices; }; key = lib.optionalAttrs is-managed config.age.secrets.syncthing-key.path; - cert = lib.optionalAttrs is-managed "${../pki/syncthing + "/${this}.cert"}"; + cert = lib.optionalAttrs is-managed "${../pki/syncthing}/${this}.cert"; }); } diff --git a/secrets.nix b/secrets.nix index e332476..49bc9cf 100644 --- a/secrets.nix +++ b/secrets.nix @@ -23,10 +23,10 @@ let mkSyncthingSecret = client: { "secrets/syncthing/${client}.age".publicKeys = [ ssh-keys.by-host.root.${client} ]; }; - syncthingSercrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients); + syncthingSecrets = lib.mergeAttrsList (map mkSyncthingSecret syncthingManagedClients); in lib.mergeAttrsList ([ (mkSecrets keys secrets) (mkSecrets trusted-keys trusted-secrets) - (syncthingSercrets) + (syncthingSecrets) ])