summaryrefslogtreecommitdiff
path: root/nixos/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/hosts')
-rw-r--r--nixos/hosts/ev/default.nix1
-rw-r--r--nixos/hosts/ev/kodi.nix5
-rw-r--r--nixos/hosts/ev/metadata.toml1
-rw-r--r--nixos/hosts/hamac/default.nix6
-rw-r--r--nixos/hosts/hamac/metadata.toml1
-rw-r--r--nixos/hosts/tente/default.nix59
-rw-r--r--nixos/hosts/tente/metadata.toml1
-rw-r--r--nixos/hosts/tente/monitoring.nix11
8 files changed, 64 insertions, 21 deletions
diff --git a/nixos/hosts/ev/default.nix b/nixos/hosts/ev/default.nix
index e59ec01..9842f4f 100644
--- a/nixos/hosts/ev/default.nix
+++ b/nixos/hosts/ev/default.nix
@@ -1,4 +1,3 @@
-# channel="nixos-small"
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
diff --git a/nixos/hosts/ev/kodi.nix b/nixos/hosts/ev/kodi.nix
index 2aea216..3862dfe 100644
--- a/nixos/hosts/ev/kodi.nix
+++ b/nixos/hosts/ev/kodi.nix
@@ -7,7 +7,10 @@ let
in
{
config = {
- users.extraUsers.kodi.isNormalUser = true;
+ users.users.kodi = {
+ isNormalUser = true;
+ extraGroups = ["audio"];
+ };
services = {
cage = {
diff --git a/nixos/hosts/ev/metadata.toml b/nixos/hosts/ev/metadata.toml
new file mode 100644
index 0000000..58f0301
--- /dev/null
+++ b/nixos/hosts/ev/metadata.toml
@@ -0,0 +1 @@
+channel = "nixos-small"
diff --git a/nixos/hosts/hamac/default.nix b/nixos/hosts/hamac/default.nix
index 7085ed3..9c4bde6 100644
--- a/nixos/hosts/hamac/default.nix
+++ b/nixos/hosts/hamac/default.nix
@@ -1,14 +1,8 @@
-# channel="nixos"
# See the configuration.nix(5) man page and the NixOS manual (accessible by running `nixos-help`).
-let
- sources = import ../../npins;
- pkgs-unstable = import sources.nixpkgs-unstable {};
-in
{ config, lib, pkgs, ... }:
{
- _module.args = { inherit pkgs-unstable; };
imports = [
./hardware-configuration.nix
<top/profiles/workstation>
diff --git a/nixos/hosts/hamac/metadata.toml b/nixos/hosts/hamac/metadata.toml
new file mode 100644
index 0000000..fc34e27
--- /dev/null
+++ b/nixos/hosts/hamac/metadata.toml
@@ -0,0 +1 @@
+channel = "nixos"
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index 8904ba7..23e94bc 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -1,4 +1,3 @@
-# channel="nixos-small"
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
@@ -6,9 +5,9 @@
{ config, lib, pkgs, ... }:
let
- domain = "push-f.com";
+ baseDomain = "push-f.com";
acmeEmail = "martin@push-f.com";
- sources = import ../../npins;
+ sources = import <top/npins>;
helpers = import <top/helpers.nix> { inherit config; };
in
{
@@ -23,29 +22,52 @@ in
./headscale.nix
./matrix.nix
./monitoring.nix
+ "${sources.my-lex-surf}/service.nix"
"${sources.my-osm-proposals}/service.nix"
"${sources.my-geopos-link}/service.nix"
+ "${sources.my-rust-features}/service.nix"
"${sources.my-spec-pub}/service.nix"
];
- web-personal.domain = domain;
+ web-personal.domain = baseDomain;
web-personal.matrixApiDomain = config.matrix.apiDomain;
- git.webUiDomain = "git.${domain}";
- headscale.domain = "tailscale.${domain}";
- matrix.serverName = domain;
- matrix.apiDomain = "matrix.${domain}";
+ git.webUiDomain = "git.${baseDomain}";
+ headscale.domain = "tailscale.${baseDomain}";
+ matrix.serverName = baseDomain;
+ matrix.apiDomain = "matrix.${baseDomain}";
+
+ users.users.www-generator = {
+ isSystemUser = true;
+ group = "www-generator";
+ };
+ users.groups.www-generator = {};
+
+ services.lex-surf =
+ let
+ domain = "lex.surf";
+ in
+ {
+ enable = true;
+ domain = domain;
+ enableACME = true;
+ fetchUser = "www-generator";
+ nginx = {
+ forceSSL = true;
+ extraConfig = helpers.mkNginxConfig domain;
+ };
+ };
services.osm_proposals =
let
- subdomain = "osm-proposals.${domain}";
+ domain = "osm-proposals.${baseDomain}";
in
{
enable = true;
- virtualHost = subdomain;
+ virtualHost = domain;
nginx = {
enableACME = true;
forceSSL = true;
- extraConfig = helpers.mkNginxConfig subdomain;
+ extraConfig = helpers.mkNginxConfig domain;
};
};
@@ -63,6 +85,21 @@ in
};
};
+ services.rust-features =
+ let
+ domain = "rust-features.${baseDomain}";
+ in
+ {
+ enable = true;
+ user = "www-generator";
+ virtualHost = domain;
+ nginx = {
+ enableACME = true;
+ forceSSL = true;
+ extraConfig = helpers.mkNginxConfig domain;
+ };
+ };
+
services.spec-pub =
let
domain = "spec.pub";
diff --git a/nixos/hosts/tente/metadata.toml b/nixos/hosts/tente/metadata.toml
new file mode 100644
index 0000000..58f0301
--- /dev/null
+++ b/nixos/hosts/tente/metadata.toml
@@ -0,0 +1 @@
+channel = "nixos-small"
diff --git a/nixos/hosts/tente/monitoring.nix b/nixos/hosts/tente/monitoring.nix
index 7e92eed..545ae24 100644
--- a/nixos/hosts/tente/monitoring.nix
+++ b/nixos/hosts/tente/monitoring.nix
@@ -57,6 +57,8 @@ in
services.prometheus = {
enable = true;
+ retentionTime = "1y";
+
scrapeConfigs = [
{
job_name = "node";
@@ -180,8 +182,8 @@ in
forward_to = [loki.write.default.receiver]
stage.match {
- // Select messages from systemd services that have LogExtraFields=log_format=logfmt.
- selector = "{__journal_log_format=\"logfmt\"}"
+ // Select messages from systemd services that have LogExtraFields=LOG_FORMAT=logfmt.
+ selector = "{__journal_LOG_FORMAT=\"logfmt\"}"
stage.logfmt {
mapping = { time = "", level = "" }
}
@@ -189,6 +191,11 @@ in
source = "time"
format = "RFC3339"
}
+ stage.template {
+ // The slog package of the Go standard library prints levels as uppercase.
+ source = "level"
+ template = "{{ ToLower .Value }}"
+ }
stage.structured_metadata {
values = { level = "" }
}