chore: update

This commit is contained in:
winston 2024-08-13 07:21:27 +02:00
parent 2fa3ff35c7
commit 87c17e2628
10 changed files with 31 additions and 198 deletions

View file

@ -4,10 +4,9 @@
./atuin.nix ./atuin.nix
./containers.nix ./containers.nix
./freshrss.nix ./freshrss.nix
# ./gitea
./gitlab ./gitlab
./invidious.nix ./invidious.nix
./libreddit.nix ./nextcloud.nix
./nginx.nix ./nginx.nix
./postgres.nix ./postgres.nix
./wakapi.nix ./wakapi.nix

View file

@ -1,4 +0,0 @@
<a class="item" href="https://github.com/nekowinston">
<svg class="svg" aria-hidden="true" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="m12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61-.546-1.385-1.335-1.755-1.335-1.755-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57 4.801-1.574 8.236-6.074 8.236-11.369 0-6.627-5.373-12-12-12"/></svg>
GitHub
</a>

View file

@ -1,11 +0,0 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"
rel="stylesheet">
<style>
:root {
--fonts-proportional: "IBM Plex Sans", sans !important;
--fonts-monospace: "IBM Plex Mono", monospace !important;
}
</style>

View file

@ -1,17 +0,0 @@
{{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{.locale.Tr "dashboard"}}{{else}}{{.locale.Tr "home"}}{{end}}" class="page-content home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{.locale.Tr "logo"}}"/>
</div>
<div class="hero">
<h1 class="ui icon header title">winston's gitea</h1>
<h2>
<a href="/winston">You're probably looking for this page.</a>
</h2>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

View file

@ -1,113 +0,0 @@
{
config,
lib,
inputs,
pkgs,
...
}: {
# swap out Gitea stable for unstable
disabledModules = [
"services/misc/gitea.nix"
"services/continuous-integration/gitea-actions-runner.nix"
];
imports = [
"${inputs.nixpkgs-unstable}/nixos/modules/services/misc/gitea.nix"
"${inputs.nixpkgs-unstable}/nixos/modules/services/continuous-integration/gitea-actions-runner.nix"
];
services.gitea.package = pkgs.unstable.gitea;
services.gitea-actions-runner.package = pkgs.unstable.gitea-actions-runner;
age.secrets."services/gitea/password-database".owner = "gitea";
networking.firewall.allowedTCPPorts = [22];
services.elasticsearch.enable = true;
services.gitea = {
enable = true;
appName = "winston's gitea";
database = {
type = "postgres";
passwordFile = config.age.secrets."services/gitea/password-database".path;
};
lfs.enable = true;
settings = {
actions.ENABLED = true;
indexer = with config.services.elasticsearch; let
indexer = "elasticsearch";
conn = "http://${listenAddress}:${toString port}";
in {
REPO_INDEXER_ENABLED = true;
REPO_INDEXER_CONN_STR = conn;
REPO_INDEXER_TYPE = indexer;
ISSUE_INDEXER_CONN_STR = conn;
ISSUE_INDEXER_TYPE = indexer;
};
repository.ENABLE_PUSH_CREATE_USER = true;
server = rec {
DOMAIN = "git.winston.sh";
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 12492;
ROOT_URL = "https://${DOMAIN}/";
};
service.DISABLE_REGISTRATION = true;
session = {
COOKIE_SECURE = true;
SAME_SITE = "strict";
};
"ui.meta" = {
AUTHOR = "nekowinston";
DESCRIPTION = "winston's gitea instance";
};
other = {
SHOW_FOOTER_VERSION = false;
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false;
SHOW_FOOTER_BRANDING = false;
};
};
};
services.gitea-actions-runner.instances.main = {
enable = false;
name = "main";
url = config.services.gitea.settings.server.ROOT_URL;
tokenFile = config.age.secrets."services/gitea/runner-token".path;
labels = ["ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest"];
settings.container = {
network = "host";
options = "--add-host=gitea.winston.sh:host-gateway";
};
};
systemd.services.gitea.preStart = let
inherit (config.services.gitea) stateDir;
in
lib.mkAfter ''
chmod u+w -R ${stateDir}/custom/**/*
# apply customizations
cp -Rf ${./customizations}/* ${stateDir}/custom
chmod u-w -R ${stateDir}/custom/**/*
'';
services.nginx.virtualHosts.${config.services.gitea.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = false;
useACMEHost = "winston.sh";
locations."/" = with config.services.gitea.settings.server; {
extraConfig = "client_max_body_size 512M;";
proxyPass = "http://${HTTP_ADDR}:${toString HTTP_PORT}";
};
};
}

View file

@ -16,6 +16,7 @@
settings = { settings = {
external_port = lib.mkForce 443; external_port = lib.mkForce 443;
db.user = "invidious";
enable_user_notifications = false; enable_user_notifications = false;
popular_enabled = false; popular_enabled = false;
statistics_enabled = true; statistics_enabled = true;

View file

@ -1,22 +0,0 @@
{
config,
pkgs,
...
}: {
services.libreddit = {
enable = true;
package = pkgs.unstable.libreddit;
address = "127.0.0.1";
port = 12380;
};
services.nginx.virtualHosts."lr.winston.sh" = {
forceSSL = true;
enableACME = false;
useACMEHost = "winston.sh";
locations."/" = with config.services.libreddit; {
proxyPass = "http://${address}:${toString port}";
};
};
}

View file

@ -0,0 +1 @@
{}

View file

@ -10,11 +10,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1718371084, "lastModified": 1723293904,
"narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "3a56735779db467538fb2e577eda28a9daacaca6", "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -30,11 +30,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717285511, "lastModified": 1722555600,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,16 +89,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717476296, "lastModified": 1720042825,
"narHash": "sha256-ScHe38Tr+TxGURC17kby4mIIxOG3aJvZWXzPM79UnEk=", "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "095ef64aa3b2ab4a4f1bf07f29997e21e3a5576a", "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.11", "ref": "release-24.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -110,11 +110,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719111455, "lastModified": 1723352546,
"narHash": "sha256-rnIxHx+fLpydjMQsbpZ21kblUr/lMqSaAtMA4+qMMEE=", "narHash": "sha256-WTIrvp0yV8ODd6lxAq4F7EbrPQv0gscBnyfn559c3k8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "4293f532d0107dfb7e6f8b34a0421dc8111320e6", "rev": "ec78079a904d7d55e81a0468d764d0fffb50ac06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -145,27 +145,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718811006, "lastModified": 1723282977,
"narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=", "narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "03d771e513ce90147b65fe922d87d3a0356fc125", "rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-23.11", "ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1719075281, "lastModified": 1723175592,
"narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", "rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -187,11 +187,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718879355, "lastModified": 1723202784,
"narHash": "sha256-RTyqP4fBX2MdhNuMP+fnR3lIwbdtXhyj7w7fwtvgspc=", "narHash": "sha256-qbhjc/NEGaDbyy0ucycubq4N3//gDFFH3DOmp1D3u1Q=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "8cd35b9496d21a6c55164d8547d9d5280162b07a", "rev": "c7012d0c18567c889b948781bc74a501e92275d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -274,11 +274,11 @@
"steam-fetcher": "steam-fetcher" "steam-fetcher": "steam-fetcher"
}, },
"locked": { "locked": {
"lastModified": 1715833534, "lastModified": 1722314839,
"narHash": "sha256-ZsbjxO/F2bcn3mm0FkPJmWgu8z2XY05V4VeJ39k1Ksw=", "narHash": "sha256-1MXH5i7VRkeknzmkSjsPiCZnUGqMuoVKFgCiy5xkGjQ=",
"owner": "aidalgol", "owner": "aidalgol",
"repo": "valheim-server-flake", "repo": "valheim-server-flake",
"rev": "871aac4adedb5089d94bb0fb0dbf7ba27217297f", "rev": "f73a87e197b1ba8eb8b79c67cd48146b3ef44290",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -83,10 +83,10 @@
}; };
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nix-index-database = { nix-index-database = {
@ -113,7 +113,6 @@
pre-commit-hooks = { pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix"; url = "github:cachix/pre-commit-hooks.nix";
inputs.flake-compat.follows = ""; inputs.flake-compat.follows = "";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs-unstable"; inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.nixpkgs-stable.follows = "nixpkgs"; inputs.nixpkgs-stable.follows = "nixpkgs";
}; };