treewide: format using nixfmt
Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
This commit is contained in:
parent
f4464732e3
commit
e641dfa114
113 changed files with 1545 additions and 1019 deletions
|
@ -3,7 +3,8 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) fetchurl;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
@ -16,7 +17,8 @@
|
|||
img = ./img;
|
||||
dataDir = "/srv/data/forgejo";
|
||||
dumpDir = "/srv/data/forgejo-dump";
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.modules.system.services.forgejo.enable = mkEnableOption "forgejo";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -50,7 +52,7 @@ in {
|
|||
group = "git";
|
||||
isSystemUser = true;
|
||||
};
|
||||
users.groups.git = {};
|
||||
users.groups.git = { };
|
||||
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
|
@ -113,53 +115,55 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = let
|
||||
# no crawlers, thank you.
|
||||
robots = pkgs.writeText "robots-txt" ''
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
'';
|
||||
base-brand = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/base-brand.css";
|
||||
hash = "sha256-QJ775HpINf8klO3d/8h+tEw0vk34p19dWUCWWuVwcho=";
|
||||
};
|
||||
dark-variables = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/dark-variables.css";
|
||||
hash = "sha256-nCSJUOU9/R1fldoKXTTZmP7vmRjYUk/OKkbgrJ/NrXQ=";
|
||||
};
|
||||
theme-codeberg-dark = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/theme-codeberg-dark.css";
|
||||
hash = "sha256-KyXznH49koRGlzIDDqagN4PvFGD/zCX//wrctmtfgBs=";
|
||||
};
|
||||
in [
|
||||
"d '${customDir}/public' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
|
||||
# Copeberg logo, thanks Raf <3
|
||||
"L+ '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
|
||||
"L+ '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
|
||||
"L+ '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
|
||||
"L+ '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
|
||||
"L+ '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
|
||||
systemd.tmpfiles.rules =
|
||||
let
|
||||
# no crawlers, thank you.
|
||||
robots = pkgs.writeText "robots-txt" ''
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
'';
|
||||
base-brand = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/base-brand.css";
|
||||
hash = "sha256-QJ775HpINf8klO3d/8h+tEw0vk34p19dWUCWWuVwcho=";
|
||||
};
|
||||
dark-variables = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/dark-variables.css";
|
||||
hash = "sha256-nCSJUOU9/R1fldoKXTTZmP7vmRjYUk/OKkbgrJ/NrXQ=";
|
||||
};
|
||||
theme-codeberg-dark = fetchurl {
|
||||
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/theme-codeberg-dark.css";
|
||||
hash = "sha256-KyXznH49koRGlzIDDqagN4PvFGD/zCX//wrctmtfgBs=";
|
||||
};
|
||||
in
|
||||
[
|
||||
"d '${customDir}/public' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
|
||||
# Copeberg logo, thanks Raf <3
|
||||
"L+ '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
|
||||
"L+ '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
|
||||
"L+ '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
|
||||
"L+ '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
|
||||
"L+ '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
|
||||
|
||||
# Theming shenanigans
|
||||
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/css' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/css/codeberg' 0750 ${user} ${group} - -"
|
||||
# Theming shenanigans
|
||||
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/css' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/public/assets/css/codeberg' 0750 ${user} ${group} - -"
|
||||
|
||||
"L+ '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
|
||||
"L+ '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
|
||||
"L+ '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
|
||||
"L+ '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
|
||||
"L+ '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
|
||||
"L+ '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
|
||||
|
||||
# Templates
|
||||
"d '${customDir}/templates' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/templates/repo' 0750 ${user} ${group} - -"
|
||||
# Home page
|
||||
"L+ '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
|
||||
"L+ '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
|
||||
# Templates
|
||||
"d '${customDir}/templates' 0750 ${user} ${group} - -"
|
||||
"d '${customDir}/templates/repo' 0750 ${user} ${group} - -"
|
||||
# Home page
|
||||
"L+ '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
|
||||
"L+ '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
|
||||
|
||||
# Fuck off scrapers
|
||||
"L+ ${customDir}/public/robots.txt - - - - ${robots.outPath}"
|
||||
];
|
||||
# Fuck off scrapers
|
||||
"L+ ${customDir}/public/robots.txt - - - - ${robots.outPath}"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue