what
This commit is contained in:
parent
616f310f4a
commit
1555d7b643
51 changed files with 243 additions and 231 deletions
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"io.gitlab.librewolf-community"
|
||||
"org.libreoffice.LibreOffice"
|
||||
];
|
||||
}
|
5
hosts/headful/flamingo/mpv.nix
Normal file
5
hosts/headful/flamingo/mpv.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"io.mpv.Mpv"
|
||||
];
|
||||
}
|
5
hosts/headful/flamingo/spotify.nix
Normal file
5
hosts/headful/flamingo/spotify.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"com.spotify.Client"
|
||||
];
|
||||
}
|
5
hosts/headful/glacier/gimp.nix
Normal file
5
hosts/headful/glacier/gimp.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"org.gimp.GIMP"
|
||||
];
|
||||
}
|
5
hosts/headful/glacier/inkscape.nix
Normal file
5
hosts/headful/glacier/inkscape.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"org.inkscape.Inkscape"
|
||||
];
|
||||
}
|
5
hosts/headful/glacier/libreoffice.nix
Normal file
5
hosts/headful/glacier/libreoffice.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"org.libreoffice.LibreOffice"
|
||||
];
|
||||
}
|
5
hosts/headful/glacier/mpv.nix
Normal file
5
hosts/headful/glacier/mpv.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"io.mpv.Mpv"
|
||||
];
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"com.valvesoftware.Steam"
|
||||
"com.github.Matoking.protontricks"
|
||||
];
|
||||
}
|
||||
|
|
17
hosts/headful/insomniac/cosmic.nix
Normal file
17
hosts/headful/insomniac/cosmic.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.greetd.settings.initial_session = {
|
||||
user = config.users.mainUser;
|
||||
command = ''
|
||||
${lib.getExe' pkgs.coreutils "env"} XCURSOR_THEME="''${XCURSOR_THEME:-Pop}" systemd-cat --identifier start-cosmic ${lib.getExe' pkgs.cosmic-session "start-cosmic"}
|
||||
'';
|
||||
};
|
||||
|
||||
environment.cosmic.excludePackages = [
|
||||
pkgs.cosmic-store
|
||||
];
|
||||
}
|
6
hosts/headful/insomniac/flatpak.nix
Normal file
6
hosts/headful/insomniac/flatpak.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
services.flatpak.update.auto = {
|
||||
enable = true;
|
||||
onCalendar = "weekly";
|
||||
};
|
||||
}
|
5
hosts/headful/insomniac/spotify.nix
Normal file
5
hosts/headful/insomniac/spotify.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"com.spotify.Client"
|
||||
];
|
||||
}
|
5
hosts/headful/work/spotify.nix
Normal file
5
hosts/headful/work/spotify.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
services.flatpak.packages = [
|
||||
"com.spotify.Client"
|
||||
];
|
||||
}
|
14
hosts/headless/abacus/domains.nix
Normal file
14
hosts/headless/abacus/domains.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) types;
|
||||
in {
|
||||
options.networking.domains = lib.mkOption {
|
||||
description = "Domains.";
|
||||
type = types.attrsOf types.str;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.networking.domains = {
|
||||
wrz = "wrz.one";
|
||||
helvetica = "helveticanonstandard.net";
|
||||
};
|
||||
}
|
|
@ -3,8 +3,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) domain;
|
||||
virtualHostName = "tea.${domain}";
|
||||
virtualHostName = "tea.wrz.one";
|
||||
in {
|
||||
age.secrets = lib.mkSecrets {
|
||||
forgejo-mailer = {
|
||||
|
@ -43,8 +42,8 @@ in {
|
|||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "smtp.fastmail.com";
|
||||
FROM = "tea@${domain}";
|
||||
USER = "lukas@${domain}";
|
||||
FROM = "tea@wrz.one";
|
||||
USER = "lukas@wrz.one";
|
||||
};
|
||||
};
|
||||
secrets.mailer.PASSWD = config.age.secrets.forgejo-mailer.path;
|
||||
|
@ -53,6 +52,7 @@ in {
|
|||
systemd.services.forgejo.preStart = let
|
||||
forgejo = lib.getExe config.services.forgejo.package;
|
||||
passwordFile = config.age.secrets.forgejo-admin.path;
|
||||
# TODO
|
||||
user = "lukas";
|
||||
email = "lukas@wrz.one";
|
||||
in ''
|
||||
|
@ -78,10 +78,8 @@ in {
|
|||
'';
|
||||
|
||||
locations."/".proxyPass = let
|
||||
inherit (config.services.forgejo.settings.server) HTTP_ADDR HTTP_PORT;
|
||||
in "http://${lib.formatHostPort {
|
||||
host = HTTP_ADDR;
|
||||
port = HTTP_PORT;
|
||||
}}";
|
||||
host = config.services.forgejo.settings.server.HTTP_ADDR;
|
||||
port = builtins.toString config.services.forgejo.settings.server.HTTP_PORT;
|
||||
in "http://${host}:${port}";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,23 @@
|
|||
{
|
||||
services.headscale = {
|
||||
enable = true;
|
||||
address = "127.0.0.1";
|
||||
port = 3122; # TODO
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
}
|
||||
# {config, ...}: let
|
||||
# virtualHostName = "";
|
||||
# in {
|
||||
# services.headscale = {
|
||||
# enable = true;
|
||||
# address = "127.0.0.1";
|
||||
# port = 8070;
|
||||
# server_url = "https://${virtualHostName}";
|
||||
# settings = {
|
||||
# logtail.enabled = false;
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# services.nginx.virtualHosts.${virtualHostName} = {
|
||||
# forceSSL = true;
|
||||
# enableACME = true;
|
||||
# locations."/" = {
|
||||
# proxyPass = "http://localhost:${toString config.services.headscale.port}";
|
||||
# proxyWebsockets = true;
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
{}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# TODO: use another service for this
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
@ -41,9 +42,9 @@ in {
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/".proxyPass = "http://${lib.formatHostPort {
|
||||
locations."/".proxyPass = let
|
||||
host = config.services.microbin.settings.MICROBIN_BIND;
|
||||
port = config.services.microbin.settings.MICROBIN_PORT;
|
||||
}}";
|
||||
port = builtins.toString config.services.microbin.settings.MICROBIN_PORT;
|
||||
in "http://${host}:${port}";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# TODO: is this bloat
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) domain;
|
||||
virtualHostName = "navi.${domain}";
|
||||
{config, ...}: let
|
||||
virtualHostName = "navidrome.helveticanonstandard.net";
|
||||
in {
|
||||
services.navidrome = {
|
||||
enable = true;
|
||||
|
@ -19,9 +14,9 @@ in {
|
|||
enableACME = true;
|
||||
forceSSL = true;
|
||||
|
||||
locations."/".proxyPass = "http://${lib.formatHostPort {
|
||||
locations."/".proxyPass = let
|
||||
host = config.services.navidrome.settings.Address;
|
||||
port = config.services.navidrome.settings.Port;
|
||||
}}";
|
||||
port = builtins.toString config.services.navidrome.settings.Port;
|
||||
in "http://${host}:${port}";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{config, ...}: {
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
|
@ -12,11 +12,19 @@
|
|||
access_log /var/log/nginx/access.log;
|
||||
'';
|
||||
|
||||
virtualHosts."~.*" = {
|
||||
default = true;
|
||||
rejectSSL = true;
|
||||
virtualHosts = let
|
||||
matchAll = ''~.*'';
|
||||
matchWww = ''~^www\.(?<domain>.+)$'';
|
||||
in {
|
||||
# Redirect anything that doesn't match any server name to networking.domain
|
||||
${matchAll} = {
|
||||
default = true;
|
||||
rejectSSL = true;
|
||||
|
||||
globalRedirect = config.networking.domain;
|
||||
globalRedirect = "wrz.one";
|
||||
};
|
||||
# Redirect www to non-www
|
||||
${matchWww}.globalRedirect = "$domain";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) domain;
|
||||
parent = "/var/www";
|
||||
sites = [
|
||||
domain
|
||||
"log.${domain}"
|
||||
"wrz.one"
|
||||
"helveticanonstandard.net"
|
||||
];
|
||||
in
|
||||
lib.mkMerge (map (
|
||||
lib.mkMerge (
|
||||
map (
|
||||
virtualHostName: let
|
||||
root = "${parent}/${virtualHostName}";
|
||||
in {
|
||||
|
@ -28,4 +28,5 @@ in
|
|||
};
|
||||
}
|
||||
)
|
||||
sites)
|
||||
sites
|
||||
)
|
|
@ -3,8 +3,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (config.networking) domain;
|
||||
virtualHostName = "vault.${domain}";
|
||||
virtualHostName = "vault.wrz.one";
|
||||
backupDir = "/srv/backup/vaultwarden";
|
||||
in {
|
||||
age.secrets = lib.mkSecrets {vaultwarden = {};};
|
||||
|
@ -38,10 +37,10 @@ in {
|
|||
forceSSL = true;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://${lib.formatHostPort {
|
||||
proxyPass = let
|
||||
host = config.services.vaultwarden.config.ROCKET_ADDRESS;
|
||||
port = config.services.vaultwarden.config.ROCKET_PORT;
|
||||
}}";
|
||||
port = builtins.toString config.services.vaultwarden.config.ROCKET_PORT;
|
||||
in "http://${host}:${port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
{lib, ...}: let
|
||||
# TODO: unify syncthing.nix files
|
||||
let
|
||||
guiPort = 8384;
|
||||
in {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
systemService = true;
|
||||
openDefaultPorts = true;
|
||||
guiAddress = lib.formatHostPort {
|
||||
guiAddress = let
|
||||
host = "0.0.0.0";
|
||||
port = guiPort;
|
||||
};
|
||||
port = builtins.toString guiPort;
|
||||
in "${host}:${port}";
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [guiPort];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue