ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
{ secrets, ctucxConfig, pkgs, config, lib, ... }:

let
  syncthingConfig = import ctucxConfig.syncthing { inherit pkgs config lib; };

in {

  age.identityPaths = [ "/Users/katja/.ssh/id_ed25519" ];
  age.secrets = {
    syncthingKey = {
      file  = secrets."${config.networking.hostName}".syncthing.key;
      owner = "katja";
    };
    syncthingCert = {
      file  = secrets."${config.networking.hostName}".syncthing.cert;
      owner = "katja";
    };
  };

  services = {
    syncthing = {
      enable  = true;

      user    = "katja";
      group   = "staff";

      key     = config.age.secrets.syncthingKey.path;
      cert    = config.age.secrets.syncthingCert.path;

      dataDir = "/Users/katja";
      devices = syncthingConfig.devices;
      folders = syncthingConfig.folders;
    };
  };

}