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;
|
port = 8081;
|
||||||
domain = "fossil.cyplo.dev";
|
domain = "fossil.cyplo.dev";
|
||||||
baseurl = "https://${domain}";
|
baseurl = "https://${domain}";
|
||||||
|
path = "/var/lib/fossil";
|
||||||
in {
|
in {
|
||||||
imports = [ ../nginx.nix ];
|
imports = [ ../nginx.nix ];
|
||||||
|
|
||||||
|
@ -22,14 +23,18 @@ in {
|
||||||
containerPort = port;
|
containerPort = port;
|
||||||
hostPort = port;
|
hostPort = port;
|
||||||
}];
|
}];
|
||||||
|
bindMounts = {
|
||||||
|
"${path}" = {
|
||||||
|
hostPath = "${path}";
|
||||||
|
isReadOnly = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
config = { config, pkgs, ... }:
|
config = { config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
path = "/var/lib/fossil";
|
|
||||||
repoPath = "${path}/repo.fossil";
|
|
||||||
user = "fossil";
|
user = "fossil";
|
||||||
group = "fossil";
|
group = "fossil";
|
||||||
in {
|
in {
|
||||||
|
environment.systemPackages = [ pkgs.fossil ];
|
||||||
users.groups = { "${group}" = { }; };
|
users.groups = { "${group}" = { }; };
|
||||||
users.users = {
|
users.users = {
|
||||||
fossil = {
|
fossil = {
|
||||||
|
@ -53,9 +58,9 @@ in {
|
||||||
Group = group;
|
Group = group;
|
||||||
WorkingDirectory = path;
|
WorkingDirectory = path;
|
||||||
ReadWritePaths = [ path ];
|
ReadWritePaths = [ path ];
|
||||||
ExecStart = "${pkgs.fossil}/bin/fossil server --localhost --https"
|
ExecStart = "${pkgs.fossil}/bin/fossil server" + " --localhost"
|
||||||
+ " --port ${toString port}" + " --baseurl ${baseurl}"
|
+ " --https" + " --port ${toString port}"
|
||||||
+ " --create ${repoPath}";
|
+ " --baseurl ${baseurl}" + " --repolist ${path}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 3;
|
RestartSec = 3;
|
||||||
};
|
};
|
||||||
|
@ -63,5 +68,4 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue