first working fossil server
This commit is contained in:
parent
a93b230e03
commit
6545f447a4
1 changed files with 11 additions and 7 deletions
|
@ -3,6 +3,7 @@ let
|
|||
port = 8081;
|
||||
domain = "fossil.cyplo.dev";
|
||||
baseurl = "https://${domain}";
|
||||
path = "/var/lib/fossil";
|
||||
in {
|
||||
imports = [ ../nginx.nix ];
|
||||
|
||||
|
@ -22,14 +23,18 @@ in {
|
|||
containerPort = port;
|
||||
hostPort = port;
|
||||
}];
|
||||
bindMounts = {
|
||||
"${path}" = {
|
||||
hostPath = "${path}";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
config = { config, pkgs, ... }:
|
||||
let
|
||||
path = "/var/lib/fossil";
|
||||
repoPath = "${path}/repo.fossil";
|
||||
user = "fossil";
|
||||
group = "fossil";
|
||||
in {
|
||||
|
||||
environment.systemPackages = [ pkgs.fossil ];
|
||||
users.groups = { "${group}" = { }; };
|
||||
users.users = {
|
||||
fossil = {
|
||||
|
@ -53,9 +58,9 @@ in {
|
|||
Group = group;
|
||||
WorkingDirectory = path;
|
||||
ReadWritePaths = [ path ];
|
||||
ExecStart = "${pkgs.fossil}/bin/fossil server --localhost --https"
|
||||
+ " --port ${toString port}" + " --baseurl ${baseurl}"
|
||||
+ " --create ${repoPath}";
|
||||
ExecStart = "${pkgs.fossil}/bin/fossil server" + " --localhost"
|
||||
+ " --https" + " --port ${toString port}"
|
||||
+ " --baseurl ${baseurl}" + " --repolist ${path}";
|
||||
Restart = "always";
|
||||
RestartSec = 3;
|
||||
};
|
||||
|
@ -63,5 +68,4 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue