Setting up Kamal

This commit is contained in:
Trevor Vallender 2023-09-29 10:38:28 +01:00
parent 85352086d9
commit 0e81fa14d0
4 changed files with 41 additions and 1 deletions

View File

@ -35,4 +35,20 @@
gnupg gnupg
vim vim
]; ];
virtualisation.docker = {
enable = true;
storageDriver = "btrfs";
logDriver = "json-file";
};
users.users.kamal = {
isNormalUser = true;
extraGroups = [
"docker"
];
openssh.authorizedKeys.keyFiles = [
../../users/tsv/authorized_keys
];
};
} }

View File

@ -19,6 +19,23 @@
enableACME = true; enableACME = true;
}; };
virtualHosts."tsvallender.co.uk" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8000";
extraConfig =
"proxy_set_header X-Real-IP $remote_addr;" +
"proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;" +
"proxy_set_header X-Forwarded-Proto https;" +
"proxy_set_header X-Forwarded-Server $host;" +
"proxy_set_header X-Forwarded-Ssl on;" +
"proxy_set_header Host $host;" +
"proxy_redirect off;"
;
};
};
virtualHosts."syncthing.tsvallender.co.uk" = { virtualHosts."syncthing.tsvallender.co.uk" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;

View File

@ -49,7 +49,7 @@
package = pkgs.nixFlakes; package = pkgs.nixFlakes;
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
trusted-users = [ "root" "tsv" "nixremote" ]; trusted-users = [ "root" "tsv" "kamal" ];
}; };
gc = { gc = {
automatic = true; automatic = true;

View File

@ -18,6 +18,13 @@ Host git.tsvallender.co.uk
User tsv User tsv
IdentitiesOnly yes IdentitiesOnly yes
Host tsvallender.co.uk
HostName tsvallender.co.uk
IdentityFile /home/tsv/.ssh/personal
Port 2222
User kamal
IdentitiesOnly yes
Host github.com Host github.com
HostName github.com HostName github.com
IdentityFile /home/tsv/.ssh/foxsoft IdentityFile /home/tsv/.ssh/foxsoft