MMore stuff
This commit is contained in:
parent
01c04cd91c
commit
35fd1799a2
18 changed files with 62 additions and 291 deletions
20
maskiner/node/alloy-systemd.yaml
Normal file
20
maskiner/node/alloy-systemd.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
loki.relabel "journal" {
|
||||
forward_to = []
|
||||
|
||||
rule {
|
||||
source_labels = ["__journal__systemd_unit"]
|
||||
target_label = "unit"
|
||||
}
|
||||
}
|
||||
|
||||
loki.source.journal "read" {
|
||||
forward_to = [loki.write.endpoint.receiver]
|
||||
relabel_rules = loki.relabel.journal.rules
|
||||
labels = {component = "desktop"}
|
||||
}
|
||||
|
||||
loki.write "endpoint" {
|
||||
endpoint {
|
||||
url ="http://localhost:3100/loki/api/v1/push"
|
||||
}
|
||||
}
|
106
maskiner/node/configuration.nix
Normal file
106
maskiner/node/configuration.nix
Normal file
|
@ -0,0 +1,106 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
myhostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../moduler/base.nix
|
||||
../../moduler/users.nix
|
||||
../../moduler/kitchenowl.nix
|
||||
../../moduler/radicale.nix
|
||||
../../moduler/vaultwarden.nix
|
||||
../../moduler/signal.nix
|
||||
../../moduler/uptime-kuma.nix
|
||||
../../moduler/services/monitoring
|
||||
../../moduler/services/headscale
|
||||
# ../../moduler/wastring.nix
|
||||
];
|
||||
|
||||
sops.defaultSopsFile = ../../secrets/sops.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.secrets.gandi_key = {
|
||||
path = "/run/secrets/gandi_key";
|
||||
owner = "root";
|
||||
mode = "0440";
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
domain = "grafana.wastring.com";
|
||||
};
|
||||
|
||||
headscale = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
prometheus = {
|
||||
enable = true;
|
||||
exporters.enable = true;
|
||||
};
|
||||
|
||||
loki = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
alloy = {
|
||||
enable = true;
|
||||
configPath = ./alloy-systemd.yaml;
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDALsdpwvC0w/Aj+1fWtzJyyWoUrGkdh8o2thVHeQQBNo0D7cmVberYmi4Cv9gWGX6PaElrnOl0KRdGyro2wxOYokSxgk2VgWW67BFITAQAbKyG2NhXXPbhb4jccDo7WH7TtOG8IofuJTPRu1Duda6k4RN0I0CkyAN6LGX+zy49cq0qKf9ijXYhCDYNih3+Fu/ig0aW/SYmsVoUl2VFTWdI5x5/wLvIjTEZhmAtYIeYADaLnom356cFrUysZa++FUujQAz3Ow236BvP95XZdTsqvfWNZFNIpC9VYF72JeIDCs5wDIr0GFmanF2On1nar+jJpoOE8SdHt357p5g/PqXV5TisN2xQRkqVwO9tWtMl4sF84jA4ULnY2gQWv9jErMxymUQ1IwuPUzDDlbRHCtfexAtkBy7wv6xslKAzG1QahvF/btNs5Caj3LN31rgAuxyooCbKGKTeBP3kHPKcz1iupgidfbO/QqVXBRQJTEdGyAKa8hVmLQZZPC/XUhxESAk= fw@fw-nix"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8ku8iCb7tXd/tfxYDW+Tj8K9kpfrYZciYUZ6tBpO80inm4EImtfyEeJTuqDWMKov2BftUKs8brNeTBCXUEvU1P0+cpOP9RtYA5tfBXf3su+iVSswJJStIxNboXHrEGKdJJRNsTv/9agshDSUBy6G5TI1cXhv/updornfA4fwOMqOmtlYEn6XCRnsrO6NBLc/uLckdbF75HOsoLvezRvuqTLjpapjaUKGVPrgNXiclIKHmuOx71kgD4FX3rSz9FgKjnfu3a7DBbrHsf/g+N9PjNF1muN9UOV6nK3WwiO9BMWi7NpAWfzJOeZg9chqzI+U6CcsqYVeESgL41so+dnv3 fw@laptop"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP34dnsZSnWdDvd+3BXDwcw7wP0PjPEx2eCdBQJyGD6O fw@laptop"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII60tdNsG0z9q2jHmoTKvkeLQE6OF0bmTsDX1bpqpoG7 fw@jobb"
|
||||
];
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "fredrik@wastring.com";
|
||||
certs."shop.wastring.com" = {
|
||||
dnsProvider = "gandiv5";
|
||||
webroot = null;
|
||||
credentialsFile = config.sops.secrets.gandi_key.path;
|
||||
dnsPropagationCheck = true;
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
virtualHosts."shop.wastring.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8080";
|
||||
proxyWebsockets = true;
|
||||
extraConfig =
|
||||
"proxy_ssl_server_name on;"
|
||||
+
|
||||
# required when the server wants to use HTTP Authentication
|
||||
"proxy_pass_header Authorization;";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = myhostname;
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
38
maskiner/node/hardware-configuration.nix
Normal file
38
maskiner/node/hardware-configuration.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/938e8a9e-d02d-449e-9b60-199a047c4772";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/8534-38E5";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue