Compare commits
10 commits
6989cf06a3
...
0c2250e479
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c2250e479 | |||
| 31ed4c0c5f | |||
| 57fad610ad | |||
| 798804f3a2 | |||
| cebab715b2 | |||
| 0749ceccea | |||
| a7c598fe42 | |||
| 2bbad71636 | |||
| 06bd84ac86 | |||
| b33a358d89 |
5 changed files with 90 additions and 15 deletions
|
|
@ -39,6 +39,13 @@
|
||||||
dataLocation = "${config.home.homeDirectory}/.local/share/task";
|
dataLocation = "${config.home.homeDirectory}/.local/share/task";
|
||||||
colorTheme = "light-256";
|
colorTheme = "light-256";
|
||||||
config.editor = "hx";
|
config.editor = "hx";
|
||||||
|
config.taskd = {
|
||||||
|
server = "henri-saudubray.fr:53589";
|
||||||
|
certificate = "/home/hms/.task/keys/public.cert";
|
||||||
|
key = "/home/hms/.task/keys/private.key";
|
||||||
|
ca = "/home/hms/.task/keys/ca.cert";
|
||||||
|
credentials = "personal/hms/2f8f33f0-a0b3-4f61-aba7-4d2b8c9cfbc7";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.jujutsu = {
|
programs.jujutsu = {
|
||||||
|
|
|
||||||
|
|
@ -4,24 +4,18 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
../../nixos/server.nix
|
../../nixos/server.nix
|
||||||
|
./nginx.nix
|
||||||
|
./taskd.nix
|
||||||
|
./forgejo.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.nginx = {
|
networking.firewall.allowedTCPPorts = [
|
||||||
enable = true;
|
80 # HTTP (nginx)
|
||||||
virtualHosts."henri-saudubray.fr" = {
|
443 # HTTPS (nginx)
|
||||||
enableACME = true;
|
53589 # Taskserver
|
||||||
forceSSL = true;
|
];
|
||||||
root = "/home/hms/www";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "henri.saudubray@proton.me";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "mystra";
|
networking.hostName = "mystra";
|
||||||
|
networking.fqdn = "henri-saudubray.fr";
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
31
hosts/mystra/forgejo.nix
Normal file
31
hosts/mystra/forgejo.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.services.forgejo;
|
||||||
|
srv = cfg.settings.server;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts."git.henri-saudubray.fr" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.henri-saudubray.fr";
|
||||||
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
SSH_PORT = lib.head config.services.openssh.ports;
|
||||||
|
};
|
||||||
|
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
hosts/mystra/nginx.nix
Normal file
16
hosts/mystra/nginx.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."henri-saudubray.fr" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = "/var/www/html";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "henri.saudubray@proton.me";
|
||||||
|
};
|
||||||
|
}
|
||||||
27
hosts/mystra/taskd.nix
Normal file
27
hosts/mystra/taskd.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
# # NOTE:
|
||||||
|
# After server installation, you must synchronize the clients with
|
||||||
|
# taskd. To do so, export the user config as follows (on server):
|
||||||
|
# ```bash
|
||||||
|
# nixos-taskserver user export personal hms > hms_config.sh
|
||||||
|
# ```
|
||||||
|
# and copy it to the client machine. Run it (on client):
|
||||||
|
# ```bash
|
||||||
|
# sh hms_config.sh
|
||||||
|
# ```
|
||||||
|
# and initialize synchronization (on client):
|
||||||
|
# ```bash
|
||||||
|
# task sync init
|
||||||
|
# ```
|
||||||
|
# See [this link](https://wiki.kunzelma.de/taskwarrior) for more.
|
||||||
|
#
|
||||||
|
# # TODO: find a better way than the mess above.
|
||||||
|
|
||||||
|
services.taskserver = {
|
||||||
|
enable = true;
|
||||||
|
fqdn = "henri-saudubray.fr";
|
||||||
|
listenHost = "::";
|
||||||
|
organisations.personal.users = [ "hms" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue