Compare commits

...

5 Commits

Author SHA1 Message Date
Giulio De Pasquale
8cde2f28fb Merge branch 'master' of ssh://git.giugl.io/peperunas/nixos 2023-06-12 20:24:25 +02:00
Giulio De Pasquale
a263496047 zsh: enable autosuggestions, added dotDir 2023-06-11 01:31:02 +02:00
Giulio De Pasquale
29cf6fece7 nextcloud: fixed mariadb 10.11. add nodejs, ffmpeg and libtensorflow in system packages for recognize, the plugin 2023-06-11 01:30:34 +02:00
Giulio De Pasquale
44e991b35f Update lock 2023-06-10 03:47:31 +02:00
Giulio De Pasquale
4a9c3cf246 deluge: port to vhost 2023-06-10 03:15:26 +02:00
4 changed files with 27 additions and 29 deletions

12
flake.lock generated
View File

@ -23,11 +23,11 @@
}, },
"nixos-unstable": { "nixos-unstable": {
"locked": { "locked": {
"lastModified": 1685931219, "lastModified": 1686226982,
"narHash": "sha256-8EWeOZ6LKQfgAjB/USffUSELPRjw88A+xTcXnOUvO5M=", "narHash": "sha256-nLuiPoeiVfqqzeq9rmXxpybh77VS37dsY/k8N2LoxVg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7409480d5c8584a1a83c422530419efe4afb0d19", "rev": "a64b73e07d4aa65cfcbda29ecf78eaf9e72e44bd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1686059680, "lastModified": 1686353867,
"narHash": "sha256-sp0WlCIeVczzB0G8f8iyRg3IYW7KG31mI66z7HIZwrI=", "narHash": "sha256-M6fe0+CiZTagmr2KM1pEaB+wwlSC+FY7nTJ4FGRctsw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a558f7ac29f50c4b937fb5c102f587678ae1c9fb", "rev": "bdbe3803330045c7b3f84b9df6ab7f8471d909ec",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,11 +2,6 @@
let let
domain = "htdel.giugl.io"; domain = "htdel.giugl.io";
auth_block = (import ./openid.nix { inherit lib; }).openresty_oidc_block;
utilities = import ./utilities.nix { inherit lib config; };
inherit (utilities) architectInterfaceAddress;
listenPorts = [ 51413 51414 ]; listenPorts = [ 51413 51414 ];
in in
{ {
@ -41,25 +36,22 @@ in
authFile = "/secrets/deluge/auth"; authFile = "/secrets/deluge/auth";
extraPackages = [ pkgs.unrar ]; extraPackages = [ pkgs.unrar ];
}; };
};
nginx.virtualHosts.${domain} = { architect.vhost.${domain} = with config.architect.networks; {
forceSSL = true; dnsInterfaces = [ "lan" "wireguard" "tailscale" ];
enableACME = true; locations = {
"/" = {
allowLan = true;
port = 8112;
locations."/" = { allow = [
proxyPass = "http://127.0.0.1:8112"; wireguard.net
extraConfig = auth_block { tailscale.net
access_role = "deluge"; ];
};
}; };
}; };
}; };
networking.extraHosts = ''
${architectInterfaceAddress "lan"} ${domain}
${architectInterfaceAddress "wireguard"} ${domain}
${architectInterfaceAddress "tailscale"} ${domain}
'';
users.groups.media.members = [ "deluge" ]; users.groups.media.members = [ "deluge" ];
} }

View File

@ -8,6 +8,12 @@ let
inherit (utilities) architectInterfaceAddress; inherit (utilities) architectInterfaceAddress;
in in
{ {
environment.systemPackages = with pkgs; [
nodejs-18_x
libtensorflow
ffmpeg
];
services = { services = {
nginx.virtualHosts.${domain} = { nginx.virtualHosts.${domain} = {
forceSSL = true; forceSSL = true;
@ -16,7 +22,7 @@ in
mysql = { mysql = {
enable = true; enable = true;
package = pkgs.mariadb; package = pkgs.mariadb_1011;
}; };
redis = { redis = {
@ -42,7 +48,7 @@ in
autoUpdateApps.startAt = "05:00:00"; autoUpdateApps.startAt = "05:00:00";
maxUploadSize = "50G"; maxUploadSize = "50G";
config = { config = {
overwriteProtocol = "https"; overwriteProtocol = "https";
dbtype = "mysql"; dbtype = "mysql";
@ -51,7 +57,6 @@ in
dbname = "nextcloud"; dbname = "nextcloud";
dbpassFile = "/secrets/nextcloud/dbpass.txt"; dbpassFile = "/secrets/nextcloud/dbpass.txt";
adminpassFile = "/secrets/nextcloud/dbpass.txt"; adminpassFile = "/secrets/nextcloud/dbpass.txt";
extraTrustedDomains = [ "${domain}" ];
}; };
}; };
}; };

View File

@ -11,7 +11,8 @@
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ]; plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
theme = "bira"; theme = "bira";
}; };
enableAutosuggestions = true;
dotDir = ".config/zsh";
initExtra = '' initExtra = ''
any-nix-shell zsh --info-right | source /dev/stdin any-nix-shell zsh --info-right | source /dev/stdin
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh