linted
This commit is contained in:
atagen 2025-02-02 16:57:31 +11:00
parent 4e99a0e323
commit 7485de646a
95 changed files with 2743 additions and 2282 deletions

View file

@ -2,11 +2,11 @@
# 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
}:
let
wekan-compose = pkgs.fetchurl {
url = "https://github.com/wekan/wekan/raw/v6.68/docker-compose.yml";
sha256 = "sha256-gLZ8bZZ8ZMo1NGz3ooIgXRH6JuMoEMp+to7lfqAvc6E=";
@ -18,18 +18,15 @@
# sed -i 's/80:8080/7897:8080/g' $out
# sed -i 's/ROOT_URL=.*/ROOT_URL=https:\/\/reflector\.beam\/kanban\//' $out
# '';
wekan-rhizome = pkgs.runCommand "wekan-rhizome" {} ''
wekan-rhizome = pkgs.runCommand "wekan-rhizome" { } ''
cp ${wekan-compose} $out
sed -i '/localtime/d' $out
sed -i '/timezone/d' $out
sed -i 's/80:8080/7897:8080/g' $out
sed -i 's/ROOT_URL=.*/ROOT_URL=https:\/\/board\.rhizome\.tf\//' $out
'';
foswiki-compose = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/timlegge/docker-foswiki/master/docker-compose.1-simple.yml";
sha256 = "sha256-XqGWGTZ/URKsIdDEEpBQUK7xoIdZ164lRhHEiWdnKpM=";
};
in {
in
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -41,7 +38,10 @@ in {
# "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.
@ -58,8 +58,8 @@ 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.
packages = with pkgs; [];
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"
];
@ -113,7 +113,11 @@ 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;
};
};
@ -147,27 +151,33 @@ in {
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 = [
@ -191,7 +201,7 @@ in {
};
systemd.services.woodpecker-agent = {
wantedBy = ["multi-user.target"];
wantedBy = [ "multi-user.target" ];
description = "woodpecker CI/CD agent";
serviceConfig = {
Environment = [
@ -218,9 +228,12 @@ 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";
@ -231,8 +244,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,7 +271,7 @@ in {
enable = true;
virtualHosts = {
"atagen.co" = {
serverAliases = ["www.atagen.co"];
serverAliases = [ "www.atagen.co" ];
extraConfig = ''
respond "i live.. again"
'';
@ -318,10 +331,19 @@ in {
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