Skip to content
Snippets Groups Projects
storage000.nix 1.3 KiB
Newer Older
  • Learn to ignore specific revisions
  •   cfg = import ./storage000-config.nix;
    
    { publicStoragePort, ... }:
    
    Jean-Paul Calderone's avatar
    Jean-Paul Calderone committed
    {
      imports =
    
        [ # Include the results of the hardware scan.
    
          ./storage000-hardware.nix
    
          # Configure it as a system operated by 100TB.
          ../nixos/modules/100tb.nix
    
    Jean-Paul Calderone's avatar
    Jean-Paul Calderone committed
          # Bring in our module for configuring the Tahoe-LAFS service and other
          # Private Storage-specific things.
          ../nixos/modules/private-storage.nix
       ];
    
    Jean-Paul Calderone's avatar
    Jean-Paul Calderone committed
      # Pass the configuration specific to this host to the 100TB module to be
      # expanded into a complete system configuration.  See the 100tb module for
      # handling of this value.
      #
      # The module name is quoted because `1` makes `100tb` look an awful lot like
      # it should be a number.
    
    Jean-Paul Calderone's avatar
    Jean-Paul Calderone committed
      # Turn on the Private Storage (Tahoe-LAFS) service.
      services.private-storage =
      { enable = true;
        # Get the public IPv4 address from the node configuration.
        inherit (cfg) publicIPv4;
        # And the port to operate on is specified via parameter.
        inherit publicStoragePort;
      };
    
    
      # This value determines the NixOS release with which your system is to be
      # compatible, in order to avoid breaking some software such as database
      # servers. You should change this only after NixOS release notes say you
      # should.
      system.stateVersion = "19.03"; # Did you read the comment?
    }