feat: default labels preset for Capytal's workflow
This commit is contained in:
@@ -1,6 +1,14 @@
|
|||||||
{...}: {
|
{inputs, ...}: let
|
||||||
|
catppuccin-base16 = builtins.fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/tinted-theming/schemes/spec-0.11/base16/catppuccin-mocha.yaml";
|
||||||
|
sha256 = "1vmw5fqqsg8vsbg6pr44r61pxq1r8kycwd35j3ffmd9s3pxddcvf";
|
||||||
|
};
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.base16.nixosModule
|
||||||
./forgejo
|
./forgejo
|
||||||
./garage.nix
|
./garage.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
scheme = catppuccin-base16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,106 @@ in {
|
|||||||
'';
|
'';
|
||||||
home = ./templates/home.tmpl;
|
home = ./templates/home.tmpl;
|
||||||
};
|
};
|
||||||
|
options.label."Default" = with config.scheme.withHashtag; {
|
||||||
|
"scope/a11y" = {
|
||||||
|
color = base06;
|
||||||
|
description = "Accessibility issues and improvements";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"scope/i18n" = {
|
||||||
|
color = base0F;
|
||||||
|
description = "Internationalization issues and improvements";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"scope/security" = {
|
||||||
|
color = base08;
|
||||||
|
description = "Test suite changes";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"scope/documentation" = {
|
||||||
|
color = base0E;
|
||||||
|
description = "Documentation changes";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"scope/testing" = {
|
||||||
|
color = base0E;
|
||||||
|
description = "Test suite changes";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"kind/enhancement" = {
|
||||||
|
color = base0C;
|
||||||
|
description = "Improvement on existing functionality";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"kind/bug" = {
|
||||||
|
color = base0D;
|
||||||
|
description = "Something isn't working";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"kind/feature" = {
|
||||||
|
color = base07;
|
||||||
|
description = "New functionality";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"priority/low" = {
|
||||||
|
color = base0B;
|
||||||
|
description = "The priority is low";
|
||||||
|
exclusive = true;
|
||||||
|
priority = "low";
|
||||||
|
};
|
||||||
|
"priority/medium" = {
|
||||||
|
color = base0A;
|
||||||
|
description = "The priority is medium";
|
||||||
|
exclusive = true;
|
||||||
|
priority = "medium";
|
||||||
|
};
|
||||||
|
"priority/high" = {
|
||||||
|
color = base09;
|
||||||
|
description = "The priority is high";
|
||||||
|
exclusive = true;
|
||||||
|
priority = "high";
|
||||||
|
};
|
||||||
|
"priority/critical" = {
|
||||||
|
color = base08;
|
||||||
|
description = "The priority is high";
|
||||||
|
exclusive = true;
|
||||||
|
priority = "critical";
|
||||||
|
};
|
||||||
|
"BREAKING-CHANGE" = {
|
||||||
|
color = base05;
|
||||||
|
description = "This change breaks existing functionality";
|
||||||
|
};
|
||||||
|
"status/to-do" = {
|
||||||
|
color = base0B;
|
||||||
|
description = "This is confirmed and needs work";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"status/in-progress" = {
|
||||||
|
color = base0A;
|
||||||
|
description = "This is being worked on";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"status/needs-info" = {
|
||||||
|
color = base09;
|
||||||
|
description = "This needs more information to continue";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"status/blocked" = {
|
||||||
|
color = base08;
|
||||||
|
description = "This is blocked due to something";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"status/abandoned" = {
|
||||||
|
color = base05;
|
||||||
|
description = "This is in hiatus/abandoned until further notice";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
"status/wont-fix" = {
|
||||||
|
color = base0E;
|
||||||
|
description = "This issue won't be fixed";
|
||||||
|
exclusive = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
theme = {
|
theme = {
|
||||||
"frappurccino" = frappurccino-theme;
|
"frappurccino" = frappurccino-theme;
|
||||||
};
|
};
|
||||||
@@ -90,6 +190,17 @@ in {
|
|||||||
DOMAIN = "forgejo.capytal.company";
|
DOMAIN = "forgejo.capytal.company";
|
||||||
ROOT_URL = "https://${DOMAIN}";
|
ROOT_URL = "https://${DOMAIN}";
|
||||||
};
|
};
|
||||||
|
project = {
|
||||||
|
PROJECT_BOARD_BASIC_KANBAN_TYPE = [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
repository = {
|
||||||
|
DEFAULT_REPO_UNITS = [
|
||||||
|
"repo.code"
|
||||||
|
"repo.issues"
|
||||||
|
"repo.pulls"
|
||||||
|
];
|
||||||
|
};
|
||||||
admin = {
|
admin = {
|
||||||
DISABLE_REGULAR_ORG_CREATION = true;
|
DISABLE_REGULAR_ORG_CREATION = true;
|
||||||
USER_DISABLED_FEATURES = "deletion manage_ssh_keys manage_gpg_keys";
|
USER_DISABLED_FEATURES = "deletion manage_ssh_keys manage_gpg_keys";
|
||||||
|
|||||||
69
flake.lock
generated
69
flake.lock
generated
@@ -1,5 +1,23 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"base16": {
|
||||||
|
"inputs": {
|
||||||
|
"fromYaml": "fromYaml"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721224776,
|
||||||
|
"narHash": "sha256-iakVQHg2DSmdOc5dNBwrDt9JLRxX5MT+IIbxfZEpGdo=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"rev": "c89c8123310257f3ddc04cc59aa4b5573c6d515f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"dot013-environment": {
|
"dot013-environment": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -34,11 +52,27 @@
|
|||||||
"rev": "b24a35a56013a760515198fae58ce8711a22d05c",
|
"rev": "b24a35a56013a760515198fae58ce8711a22d05c",
|
||||||
"revCount": 54,
|
"revCount": 54,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:///home/guz/.projects/capytal/frappurccino-forgejo"
|
"url": "https://forgejo.capytal.company/capytal/frappurccino-forgejo"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:///home/guz/.projects/capytal/frappurccino-forgejo"
|
"url": "https://forgejo.capytal.company/capytal/frappurccino-forgejo"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fromYaml": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721222302,
|
||||||
|
"narHash": "sha256-5vL4w9+tS9yd8WpIiDUtxN1IuxCVK2nebZMs/hCXXis=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"rev": "93bad85d1633b8b27287b438c0bd394094c24d06",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gitignore": {
|
"gitignore": {
|
||||||
@@ -69,11 +103,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725703823,
|
"lastModified": 1726592409,
|
||||||
"narHash": "sha256-tDgM4d8mLK0Hd6YMB2w1BqMto1XBXADOzPEaLl10VI4=",
|
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "208df2e558b73b6a1f0faec98493cb59a25f62ba",
|
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -90,11 +124,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725765290,
|
"lastModified": 1726449931,
|
||||||
"narHash": "sha256-hwX53i24KyWzp2nWpQsn8lfGQNCP0JoW/bvQmcR1DPY=",
|
"narHash": "sha256-1AX7MyYzP7sNgZiGF8jwehCCI75y2kBGwACeryJs+yE=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "642275444c5a9defce57219c944b3179bf2adaa9",
|
"rev": "c1b0fa0bec5478185eae2fd3f39b9e906fc83995",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -105,11 +139,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725930920,
|
"lastModified": 1726447378,
|
||||||
"narHash": "sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM=",
|
"narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "44a71ff39c182edaf25a7ace5c9454e7cba2c658",
|
"rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -137,11 +171,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726062873,
|
"lastModified": 1726463316,
|
||||||
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -153,6 +187,7 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"base16": "base16",
|
||||||
"dot013-environment": "dot013-environment",
|
"dot013-environment": "dot013-environment",
|
||||||
"frappurccino-forgejo": "frappurccino-forgejo",
|
"frappurccino-forgejo": "frappurccino-forgejo",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
@@ -170,11 +205,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726218807,
|
"lastModified": 1726524647,
|
||||||
"narHash": "sha256-z7CoWbSOtsOz8TmRKDnobURkKfv6nPZCo3ayolNuQGc=",
|
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "f30b1bac192e2dc252107ac8a59a03ad25e1b96e",
|
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
15
flake.nix
15
flake.nix
@@ -20,12 +20,19 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
dot013-environment.url = "github:dot013/environment";
|
dot013-environment = {
|
||||||
dot013-environment.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
url = "github:dot013/environment";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
base16 = {
|
||||||
|
url = "github:SenchoPens/base16.nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
frappurccino-forgejo = {
|
frappurccino-forgejo = {
|
||||||
url = "git+file:///home/guz/.projects/capytal/frappurccino-forgejo";
|
# url = "git+file:///home/guz/.projects/capytal/frappurccino-forgejo";
|
||||||
# url = "git+https://forgejo.capytal.company/capytal/frappurccino-forgejo";
|
url = "git+https://forgejo.capytal.company/capytal/frappurccino-forgejo";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,6 +23,40 @@ in {
|
|||||||
type = attrsOf anything;
|
type = attrsOf anything;
|
||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
options = {
|
||||||
|
label = mkOption {
|
||||||
|
type = attrsOf (attrsOf (submodule ({
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.types; {
|
||||||
|
options = {
|
||||||
|
name = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
exclusive = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
color = mkOption {
|
||||||
|
type = str;
|
||||||
|
};
|
||||||
|
description = mkOption {
|
||||||
|
type = str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
priority = mkOption {
|
||||||
|
type = nullOr (enum ["low" "medium" "high" "critical"]);
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})));
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
templates = {
|
templates = {
|
||||||
header = mkOption {
|
header = mkOption {
|
||||||
type = nullOr fileType;
|
type = nullOr fileType;
|
||||||
@@ -81,16 +115,9 @@ in {
|
|||||||
else {source = theme;};
|
else {source = theme;};
|
||||||
assetsDir = "${forgejoConfig.customDir}/public/assets";
|
assetsDir = "${forgejoConfig.customDir}/public/assets";
|
||||||
templatesDir = "${forgejoConfig.customDir}/templates";
|
templatesDir = "${forgejoConfig.customDir}/templates";
|
||||||
|
optionsDir = "${forgejoConfig.customDir}/options";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"${templatesDir}/custom/header.tmpl" =
|
|
||||||
mkIf (!(isNull customization.templates.header))
|
|
||||||
(fileTypeToHomeFile customization.templates.header);
|
|
||||||
|
|
||||||
"${templatesDir}/home.tmpl" =
|
|
||||||
mkIf (!(isNull customization.templates.home))
|
|
||||||
(fileTypeToHomeFile customization.templates.home);
|
|
||||||
|
|
||||||
"${assetsDir}/img/logo.svg" =
|
"${assetsDir}/img/logo.svg" =
|
||||||
mkIf (!(isNull customization.logo.svg))
|
mkIf (!(isNull customization.logo.svg))
|
||||||
(fileTypeToHomeFile customization.logo.svg);
|
(fileTypeToHomeFile customization.logo.svg);
|
||||||
@@ -106,7 +133,34 @@ in {
|
|||||||
"${assetsDir}/img/favicon.png" =
|
"${assetsDir}/img/favicon.png" =
|
||||||
mkIf (!(isNull customization.favicon.png))
|
mkIf (!(isNull customization.favicon.png))
|
||||||
(fileTypeToHomeFile customization.favicon.png);
|
(fileTypeToHomeFile customization.favicon.png);
|
||||||
|
|
||||||
|
"${templatesDir}/custom/header.tmpl" =
|
||||||
|
mkIf (!(isNull customization.templates.header))
|
||||||
|
(fileTypeToHomeFile customization.templates.header);
|
||||||
|
|
||||||
|
"${templatesDir}/home.tmpl" =
|
||||||
|
mkIf (!(isNull customization.templates.home))
|
||||||
|
(fileTypeToHomeFile customization.templates.home);
|
||||||
}
|
}
|
||||||
|
// (lib.attrsets.mapAttrs'
|
||||||
|
(ln: lv:
|
||||||
|
lib.attrsets.nameValuePair "${optionsDir}/label/${ln}.yaml" {
|
||||||
|
text = toJSON {
|
||||||
|
labels = attrValues (mapAttrs
|
||||||
|
(n: v: {
|
||||||
|
name =
|
||||||
|
if isNull v.name
|
||||||
|
then n
|
||||||
|
else v.name;
|
||||||
|
exclusive = v.exclusive;
|
||||||
|
color = v.color;
|
||||||
|
description = v.description;
|
||||||
|
priority = v.priority;
|
||||||
|
})
|
||||||
|
lv);
|
||||||
|
};
|
||||||
|
})
|
||||||
|
customization.options.label)
|
||||||
// (lib.attrsets.mapAttrs'
|
// (lib.attrsets.mapAttrs'
|
||||||
(n: v: lib.attrsets.nameValuePair "${assetsDir}/${n}" v)
|
(n: v: lib.attrsets.nameValuePair "${assetsDir}/${n}" v)
|
||||||
customization.assets)
|
customization.assets)
|
||||||
|
|||||||
@@ -42,6 +42,18 @@ in {
|
|||||||
default = "https://localhost:${toString cfg.settings.server.HTTP_PORT}";
|
default = "https://localhost:${toString cfg.settings.server.HTTP_PORT}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
project = {
|
||||||
|
PROJECT_BOARD_BASIC_KANBAN_TYPE = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
defaut = ["To Do" "In Progress" "Done"];
|
||||||
|
apply = t: initList t;
|
||||||
|
};
|
||||||
|
PROJECT_BOARD_BUG_TRIAGE_TYPE = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
defaut = ["Needs Triage" "High Priority" "Low Priority" "Closed"];
|
||||||
|
apply = t: initList t;
|
||||||
|
};
|
||||||
|
};
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_REPO_UNITS = mkOption {
|
DEFAULT_REPO_UNITS = mkOption {
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
|
|||||||
Reference in New Issue
Block a user