mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2026-05-07 13:36:24 +00:00
refactor: move common modules to modules/ directory
This commit is contained in:
parent
3abbd61cfa
commit
bf7e249d5b
35 changed files with 67 additions and 63 deletions
25
modules/services/caddy.nix
Normal file
25
modules/services/caddy.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
|
||||
# zipline
|
||||
virtualHosts."i.toast.name".extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:${toString config.services.zipline.settings.CORE_PORT}
|
||||
'';
|
||||
|
||||
# forgejo
|
||||
virtualHosts."git.toast.name".extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}
|
||||
'';
|
||||
|
||||
# tailscale
|
||||
virtualHosts."vps.curl-pence.ts.net".extraConfig = ''
|
||||
reverse_proxy /vaultwarden/* http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}
|
||||
handle_path /restic/* {
|
||||
reverse_proxy http://${toString config.services.restic.server.listenAddress}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
19
modules/services/forgejo.nix
Normal file
19
modules/services/forgejo.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
HTTP_ADDR = "127.0.0.1";
|
||||
HTTP_PORT = 3001;
|
||||
DOMAIN = "git.toast.name";
|
||||
ROOT_URL = "https://git.toast.name/";
|
||||
LANDING_PAGE = "explore";
|
||||
};
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
DEFAULT_ACTIONS_URL = "github";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/services/openssh.nix
Normal file
10
modules/services/openssh.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = false;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/services/restic-rest-server.nix
Normal file
8
modules/services/restic-rest-server.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
services.restic.server = {
|
||||
enable = true;
|
||||
appendOnly = true;
|
||||
listenAddress = "127.0.0.1:3003";
|
||||
extraFlags = [ "--no-auth" ];
|
||||
};
|
||||
}
|
||||
10
modules/services/tailscale.nix
Normal file
10
modules/services/tailscale.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
sops.secrets."tailscale/authkey" = { };
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets."tailscale/authkey".path;
|
||||
};
|
||||
}
|
||||
7
modules/services/trilium-server.nix
Normal file
7
modules/services/trilium-server.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
services.trilium-server = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
port = 8080;
|
||||
};
|
||||
}
|
||||
3
modules/services/udisks2.nix
Normal file
3
modules/services/udisks2.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.udisks2.enable = true;
|
||||
}
|
||||
10
modules/services/vaultwarden.nix
Normal file
10
modules/services/vaultwarden.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
config = {
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_PORT = 8222;
|
||||
DOMAIN = "https://vps.curl-pence.ts.net/vaultwarden";
|
||||
};
|
||||
};
|
||||
}
|
||||
3
modules/services/zerotierone.nix
Normal file
3
modules/services/zerotierone.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.zerotierone.enable = true;
|
||||
}
|
||||
13
modules/services/zipline.nix
Normal file
13
modules/services/zipline.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
sops.secrets."zipline/env" = { };
|
||||
services.zipline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CORE_HOSTNAME = "127.0.0.1";
|
||||
CORE_PORT = 3000;
|
||||
};
|
||||
environmentFiles = [ config.sops.secrets."zipline/env".path ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue