Fixed a few bugs

This commit is contained in:
Julien Malka 2021-12-27 22:19:54 +01:00
parent 61e2ddc881
commit be19ddbde6
No known key found for this signature in database
GPG key ID: 3C68E13964FEA07F

View file

@ -16,15 +16,15 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users.droneserver = { users.users.drone = {
isNormalUser = true; isNormalUser = true;
createHome = true; createHome = true;
home = "/home/droneserver"; home = "/home/drone";
extraGroups = [ droneserver config.users.groups.keys.name ]; extraGroups = [ drone config.users.groups.keys.name ];
passwordFile = config.sops.secrets.user-julien-password.path; passwordFile = config.sops.secrets.user-julien-password.path;
}; };
users.groups.droneserver = { }; users.groups.drone = { };
luj.hmgr.droneserver.luj.programs.git.enable = true; luj.hmgr.drone.luj.programs.git.enable = true;
nix.allowedUsers = [ drone ]; nix.allowedUsers = [ drone ];
sops.secrets.drone = { }; sops.secrets.drone = { };
@ -35,7 +35,7 @@ in
serviceConfig = { serviceConfig = {
EnvironmentFile = [ config.sops.secrets.drone.path ]; EnvironmentFile = [ config.sops.secrets.drone.path ];
Environment = [ Environment = [
"DRONE_SERVER_HOST=${cfg.nginx.subdomain}.julienmalka.me" "DRONE_SERVER_HOST=${cfg.subdomain}.julienmalka.me"
"DRONE_SERVER_PROTO=https" "DRONE_SERVER_PROTO=https"
"DRONE_DATABASE_DATASOURCE=postgres:///droneserver?host=/run/postgresql" "DRONE_DATABASE_DATASOURCE=postgres:///droneserver?host=/run/postgresql"
"DRONE_DATABASE_DRIVER=postgres" "DRONE_DATABASE_DRIVER=postgres"
@ -67,7 +67,7 @@ in
Group = drone; Group = drone;
EnvironmentFile = [ config.sops.secrets.drone.path ]; EnvironmentFile = [ config.sops.secrets.drone.path ];
Environment = [ Environment = [
"DRONE_SERVER_HOST=${cfg.nginx.subdomain}.julienmalka.me" "DRONE_SERVER_HOST=${cfg.subdomain}.julienmalka.me"
"DRONE_SERVER_PROTO=https" "DRONE_SERVER_PROTO=https"
"CLIENT_DRONE_RPC_HOST=127.0.0.1:3030" "CLIENT_DRONE_RPC_HOST=127.0.0.1:3030"
]; ];
@ -77,7 +77,7 @@ in
path = [ pkgs.nixUnstable pkgs.git pkgs.openssh ]; path = [ pkgs.nixUnstable pkgs.git pkgs.openssh ];
}; };
services.nginx.virtualHosts."${cfg.nginx.subdomain}.julienmalka.me" = { services.nginx.virtualHosts."${cfg.subdomain}.julienmalka.me" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {