Skip to content

ymstnt-com/raspi-dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configuration for our Raspberry PI server

Deployment

See DEPLOYMENT for instructions on how apply this config to a new system.

Adding new modules

Example service

To add a new service, create a file in the modules directory, for example:

# file: modules/example.nix
{ pkgs, ... }:

{
  services.example = {
    enable = true;
    package = pkgs.example;
  };
}

Note

Until NixOS/nix#7107 is fixed, don't forget to stage new files with git!

The module will be automatically enabled. If you want to disable it, you can exclude it when importing all the modules:

# file: hosts/raspi-doboz/configuration.nix
imports =
 [ ./hardware-configuration.nix ]
 ++ modules.allModulesExcept [
   "example"
 ];

Service with nginx, borgmatic, or other config

If a new service also needs to create an nginx virtual host, backup some data using borgmatic, set up temporary files, open ports, use an agenix secret, etc., then prefer putting those configs in the new module rather than the nginx, borgmatic modules.

# file: modules/example.nix
{ pkgs, ... }:

{
  services.example = {
    enable = true;
    package = pkgs.example;
  };

  services.nginx.virtualHosts."example.ymstnt.com".locations = {
    # ...
  };

  services.borgmatic.configurations.raspi = {
    sqlite_databases = [
      # ...
    ];
  };
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages