Refactor git modules
This commit is contained in:
parent
84065395ba
commit
d8fc5590e4
5 changed files with 47 additions and 4 deletions
|
|
@ -7,8 +7,8 @@
|
||||||
../../modules/tmux.nix
|
../../modules/tmux.nix
|
||||||
../../modules/zsh.nix
|
../../modules/zsh.nix
|
||||||
../../modules/ssh.nix
|
../../modules/ssh.nix
|
||||||
../../modules/git.nix
|
../../modules/git/home.nix
|
||||||
../../modules/lazygit.nix
|
../../modules/git/lazygit.nix
|
||||||
../../modules/btop.nix
|
../../modules/btop.nix
|
||||||
../../modules/firefox/home.nix
|
../../modules/firefox/home.nix
|
||||||
../../modules/ghostty.nix
|
../../modules/ghostty.nix
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
../../modules/tmux.nix
|
../../modules/tmux.nix
|
||||||
../../modules/zsh.nix
|
../../modules/zsh.nix
|
||||||
../../modules/ssh.nix
|
../../modules/ssh.nix
|
||||||
../../modules/git.nix
|
../../modules/git/home.nix
|
||||||
../../modules/lazygit.nix
|
../../modules/git/lazygit.nix
|
||||||
../../modules/btop.nix
|
../../modules/btop.nix
|
||||||
../../modules/font/home.nix
|
../../modules/font/home.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
43
modules/git/server.nix
Normal file
43
modules/git/server.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.git-server-custom;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.git-server-custom = {
|
||||||
|
enable = lib.mkEnableOption "Forgejo git server";
|
||||||
|
|
||||||
|
domain = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "localhost";
|
||||||
|
};
|
||||||
|
|
||||||
|
httpPort = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 3000;
|
||||||
|
};
|
||||||
|
|
||||||
|
sshPort = lib.mkOption {
|
||||||
|
type = lib.types.port;
|
||||||
|
default = 22;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
database.type = "sqlite3";
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = cfg.domain;
|
||||||
|
ROOT_URL = "https://${cfg.domain}/";
|
||||||
|
HTTP_ADDR = "127.0.0.1";
|
||||||
|
HTTP_PORT = cfg.httpPort;
|
||||||
|
SSH_PORT = cfg.sshPort;
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue