Fix test-vm flake check & minor improvements
This commit is contained in:
parent
6b46bc4bc2
commit
d54e653a2b
5 changed files with 10 additions and 6 deletions
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
pkgs_25-05,
|
||||
config,
|
||||
secrets,
|
||||
...
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
users.root.hashedPassword = "!";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
swapDevices = [ ];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
config,
|
||||
host,
|
||||
lib,
|
||||
pkgs,
|
||||
var,
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue