nixos: create 'modules/nixos' folder
Let's consolidate all modules under one path, so that NixOS, home-manager, and nix-darwin (if I ever end up using it down the line) would go under the same folder.
This commit is contained in:
parent
b52e56ed08
commit
c856933803
74 changed files with 1 additions and 1 deletions
41
modules/nixos/services/podgrab/default.nix
Normal file
41
modules/nixos/services/podgrab/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# A simple podcast fetcher
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.services.podgrab;
|
||||
in
|
||||
{
|
||||
options.my.services.podgrab = with lib; {
|
||||
enable = mkEnableOption "Podgrab, a self-hosted podcast manager";
|
||||
|
||||
passwordFile = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "/run/secrets/password.env";
|
||||
description = ''
|
||||
The path to a file containing the PASSWORD environment variable
|
||||
definition for Podgrab's authentification.
|
||||
'';
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8080;
|
||||
example = 4242;
|
||||
description = "The port on which Podgrab will listen for incoming HTTP traffic.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.podgrab = {
|
||||
enable = true;
|
||||
inherit (cfg) passwordFile port;
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
subdomain = "podgrab";
|
||||
inherit (cfg) port;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue