aboutsummaryrefslogtreecommitdiff
path: root/nix/per-host/photos/configuration.nix
blob: 15f1953f5aa89313fbbba21decf5f8574b673b43 (plain)
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
37
38
39
40
{ config, pkgs, modulesPath, lib, system, ... }:

{
  config = {
    sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
    sops.defaultSopsFile = ../../secrets/photos.yaml;

    networking.hostName = "photos";
    networking.firewall.allowedTCPPorts = [ 80 443 ];
    
    hardware.graphics = {
      enable = true;
    };

    hardware.nvidia = {
      modesetting.enable = true;
      nvidiaPersistenced = true;
      powerManagement.enable = false;
      powerManagement.finegrained = false;
      open = false;
      nvidiaSettings = true;
      package = config.boot.kernelPackages.nvidiaPackages.legacy_580;
    };

    nixpkgs.config.allowUnfree = true;

    services.xserver.videoDrivers = [ "nvidia" ];

    fileSystems = {
      "/mnt/data/kumar/legacy-media" = {
        device = "nas.bacala:/mnt/tank/customers/kumar/legacy-media";
        fsType = "nfs";
      };
      "/mnt/data/kumar/camera" = {
        device = "nas.bacala:/mnt/tank/customers/kumar/phone/camera";
        fsType = "nfs";
      };
    };
  };
}