formatted
This commit is contained in:
parent
ba1684c8d4
commit
737ca01e49
24 changed files with 468 additions and 411 deletions
119
server-conf.nix
119
server-conf.nix
|
@ -1,11 +1,13 @@
|
|||
# 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’).
|
||||
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
wekan-compose = pkgs.fetchurl {
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
wekan-compose = pkgs.fetchurl {
|
||||
url = "https://github.com/wekan/wekan/raw/v6.68/docker-compose.yml";
|
||||
sha256 = "sha256-gLZ8bZZ8ZMo1NGz3ooIgXRH6JuMoEMp+to7lfqAvc6E=";
|
||||
};
|
||||
|
@ -27,20 +29,19 @@ let
|
|||
url = "https://raw.githubusercontent.com/timlegge/docker-foswiki/master/docker-compose.1-simple.yml";
|
||||
sha256 = "sha256-XqGWGTZ/URKsIdDEEpBQUK7xoIdZ164lRhHEiWdnKpM=";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./cachix.nix
|
||||
# (import (builtins.fetchTarball "https://github.com/jonascarpay/declarative-cachix/archive/master.tar.gz"))
|
||||
];
|
||||
|
||||
in {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# ./cachix.nix
|
||||
# (import (builtins.fetchTarball "https://github.com/jonascarpay/declarative-cachix/archive/master.tar.gz"))
|
||||
];
|
||||
|
||||
# cachix = [
|
||||
# "nix-community"
|
||||
# ];
|
||||
|
||||
nix.settings.experimental-features = [ "flakes" "nix-command" ];
|
||||
|
||||
nix.settings.experimental-features = ["flakes" "nix-command"];
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
|
@ -49,7 +50,7 @@ in
|
|||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||
|
||||
networking.hostName = "reflector"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
|
@ -57,14 +58,13 @@ in
|
|||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.sunshine = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||
packages = with pkgs; [];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSQC8VgKLzoU5BSynJJuC8BFqAEN8JlSIzsZ2Vg9rfXHM7T4vbWtnxSCSbNw3CEnZCfrdDQTeRum7Uq+gvrcHWd9Aj+rVmubTdud70ybW7T7SlGv3b5TYBhMNbrAz0JIJjLnFMy3/pWids1v6mKW3i7k6Kbq8fSt7jva5Yg5x1jtkUUwvjSZjPg/E/Zl0hAcnx8fWe4foFTcYYsUbfEpp6bxdN2QuVmb17UKnLrMz6JTj88Jd2uYZkeKxGOwk+uwrd0WArY8JIiRi1NcPA3I42aAQfZKxCUY/xmVyRlF+l6K8caD4CZlysms9aXQzBhmPPDIY87AwyRlVK5JsRbaMEBMsffX2xk8DdV+2+9RbztgeXOoYk7WjJX1/+WcxY3RGn8QsUfrGALmrQTRGXgYRbtM/ZJq1m9aP6IvVQeKE1NOpKguXpmokB7JsyKPcWk/PCMVYyXM/qYspc6hRPJgGWiJsayj7myO6X5Ssl9uQnHpNNyrQNY+cx3/boBu2J1sM= bolt@quiver"
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
|
@ -73,23 +73,23 @@ in
|
|||
helix
|
||||
ripgrep
|
||||
fd
|
||||
curl
|
||||
|
||||
curl
|
||||
|
||||
cachix
|
||||
headscale
|
||||
|
||||
|
||||
comma
|
||||
|
||||
woodpecker-agent
|
||||
woodpecker-server
|
||||
|
||||
|
||||
# podman
|
||||
# podman-compose
|
||||
# shadow
|
||||
|
||||
|
||||
dufs
|
||||
];
|
||||
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
# podman = {
|
||||
|
@ -98,13 +98,13 @@ in
|
|||
# defaultNetwork.dnsname.enable = true;
|
||||
# };
|
||||
};
|
||||
|
||||
|
||||
# services.resolved = {
|
||||
# enable = true;
|
||||
# fallbackDns = [ "103.1.206.179" "168.138.8.38" "168.138.12.137" ];
|
||||
# dnssec = "false";
|
||||
# };
|
||||
|
||||
|
||||
services.fail2ban.enable = true;
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
@ -113,14 +113,14 @@ in
|
|||
enable = true;
|
||||
serverUrl = "https://net.atagen.co";
|
||||
dns = {
|
||||
nameservers = [ "103.1.206.179" "168.138.8.38" "168.138.12.137" ];
|
||||
nameservers = ["103.1.206.179" "168.138.8.38" "168.138.12.137"];
|
||||
magicDns = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
extraOptions = {
|
||||
extraOptions = {
|
||||
gui = {
|
||||
insecureSkipHostcheck = true;
|
||||
};
|
||||
|
@ -140,35 +140,34 @@ in
|
|||
};
|
||||
rootUrl = "https://git.atagen.co";
|
||||
settings.service.DISABLE_REGISTRATION = true;
|
||||
settings.webhook.ALLOWED_HOST_LIST="external,loopback";
|
||||
settings.webhook.ALLOWED_HOST_LIST = "external,loopback";
|
||||
};
|
||||
|
||||
|
||||
|
||||
users.users.ci = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
group = "ci";
|
||||
extraGroups = [ "docker" "wheel" ];
|
||||
extraGroups = ["docker" "wheel"];
|
||||
};
|
||||
users.groups.ci = { };
|
||||
users.groups.ci = {};
|
||||
|
||||
users.users.ci-agent = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
group = "ci";
|
||||
extraGroups = [ "docker" "wheel" ];
|
||||
extraGroups = ["docker" "wheel"];
|
||||
};
|
||||
users.groups.ci = { };
|
||||
users.groups.ci = {};
|
||||
|
||||
users.users.dufs = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
group = "dufs";
|
||||
};
|
||||
users.groups.dufs = { };
|
||||
|
||||
users.groups.dufs = {};
|
||||
|
||||
systemd.services.woodpecker-server = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
description = "woodpecker CI/CD server";
|
||||
serviceConfig = {
|
||||
Environment = [
|
||||
|
@ -190,9 +189,9 @@ in
|
|||
Group = "ci";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
systemd.services.woodpecker-agent = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
description = "woodpecker CI/CD agent";
|
||||
serviceConfig = {
|
||||
Environment = [
|
||||
|
@ -204,7 +203,7 @@ in
|
|||
User = "ci-agent";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# systemd.services.wekan-private = {
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [ "network.target" "docker.service" ];
|
||||
|
@ -219,9 +218,9 @@ in
|
|||
# };
|
||||
|
||||
systemd.services.wekan-rhizome = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "docker.service" ];
|
||||
requires = [ "docker.service" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network.target" "docker.service"];
|
||||
requires = ["docker.service"];
|
||||
description = "wekan kanban board for rhizomers";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
|
@ -232,8 +231,8 @@ in
|
|||
};
|
||||
|
||||
systemd.services.dufs = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = ["multi-user.target"];
|
||||
after = ["network.target"];
|
||||
description = "dufs webdav server";
|
||||
serviceConfig = {
|
||||
User = "dufs";
|
||||
|
@ -258,14 +257,13 @@ in
|
|||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts = {
|
||||
|
||||
"atagen.co" = {
|
||||
serverAliases = [ "www.atagen.co" ];
|
||||
serverAliases = ["www.atagen.co"];
|
||||
extraConfig = ''
|
||||
respond "i live.. again"
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
"iced-rs.info".extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:8765
|
||||
'';
|
||||
|
@ -285,15 +283,15 @@ in
|
|||
# "git.rhizome.tf".extraConfig = ''
|
||||
# reverse_proxy http://127.0.0.1:3033
|
||||
# '';
|
||||
|
||||
|
||||
"board.rhizome.tf".extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:7897
|
||||
'';
|
||||
|
||||
|
||||
"net.atagen.co".extraConfig = ''
|
||||
reverse_proxy http://127.0.0.1:8080
|
||||
'';
|
||||
|
||||
|
||||
"reflector.beam".extraConfig = ''
|
||||
tls /etc/selfsigned/cert.pem /etc/selfsigned/key.pem
|
||||
|
||||
|
@ -307,7 +305,6 @@ in
|
|||
reverse_proxy http://127.0.0.1:8083
|
||||
}
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -316,15 +313,15 @@ in
|
|||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
kbdInteractiveAuthentication = false;
|
||||
permitRootLogin = "no";
|
||||
permitRootLogin = "no";
|
||||
};
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
trustedInterfaces = ["tailscale0"];
|
||||
checkReversePath = "loose";
|
||||
allowedTCPPorts = [ 80 443 6660 ];
|
||||
allowedUDPPorts = [ 80 443 41641 6660 ];
|
||||
allowedTCPPorts = [80 443 6660];
|
||||
allowedUDPPorts = [80 443 41641 6660];
|
||||
};
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
|
@ -339,6 +336,4 @@ in
|
|||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "22.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue