Skip to content
Snippets Groups Projects
Select Git revision
1 result Searching

README.rst

Blame
  • issuer-payments-ovh.nix 1.09 KiB
    { modulesPath, name, lib, ... }: {
    
      imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
      boot.loader.grub.device = "/dev/sda";
      boot.kernel.sysctl = { "vm.swappiness" = 1; };
    
      fileSystems."/" = { device = "/dev/sda3"; fsType = "ext4"; };
      
      swapDevices = [ {
        device = "/dev/sda2";
      } ];
    
      # Break the tie between AWS and morph for the hostname by forcing the
      # morph-supplied name.  See also
      # <https://github.com/DBCDK/morph/issues/146>.
      networking.hostName = name;
    
      # Mount a dedicated filesystem (ideally on a dedicated volume, but that's
      # beyond control of this particular part of the system) for the
      # PaymentServer voucher database.  This makes it easier to manage for
      # tasks like backup/recovery and encryption.
      services.private-storage-issuer.databaseFileSystem = {
        label = "zkapissuer-data";
      };
    
      # Clean up packages after a while
      nix.gc = {
        automatic = true;
        dates = "weekly";
        options = "--delete-older-than 30d";
      };
    
      # Turn on automatic optimization of nix store
      # https://nixos.wiki/wiki/Storage_optimization
      nix.autoOptimiseStore = true;
    }