Configuration for my NixOS based systems and Home Manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ADD: nginx static file hosting on img.ngp.computer

+31 -9
+1
packages.nix
··· 106 106 "obsidian" 107 107 "tailscale" 108 108 "plexmediaserver" 109 + "sftpgo" 109 110 ]; 110 111 }
+29 -8
services.nix
··· 18 18 # programs.mtr.enable = true; 19 19 programs.gnupg.agent = { 20 20 enable = true; 21 - enableSSHSupport = true; 21 + enableSSHSupport = false; 22 22 }; 23 23 24 24 # Fish shell, the best ··· 202 202 }; 203 203 }; 204 204 205 - services.webdav.enable = true; 205 + services.webdav.enable = false; 206 + services.sftpgo = { 207 + enable = false; 208 + dataDir = /srv/shokuhou/documents/sftpgo; 209 + group = "nas"; 210 + }; 206 211 207 212 services.grafana = { 208 213 enable = false; ··· 330 335 # Nginx Reverse SSL Proxy 331 336 services.nginx = { 332 337 enable = true; 333 - group = "httpd"; 338 + group = "nas"; 339 + user = "noah"; 334 340 335 341 # This is disabled for now 336 342 #virtualHosts."${config.services.grafana.settings.server.domain}" = { ··· 343 349 virtualHosts."img.ngp.computer" = { 344 350 forceSSL = true; 345 351 enableACME = true; 346 - # Don't use this unless you want the contents of this folder to be in the Nix 347 - # Store and only updated when switching 348 - #root = "/srv/shokuhou/pictures/public"; 352 + root = "/srv/shokuhou/pictures/public"; 349 353 extraConfig = '' 350 354 sendfile on; 351 - sendfile_max_chunk 1m; 355 + autoindex_exact_size on; 352 356 tcp_nopush on; 353 - root /srv/shokuhou/pictures/public; 354 357 ''; 358 + locations."/" = { 359 + extraConfig = '' 360 + autoindex on; 361 + autoindex_exact_size on; 362 + alias /srv/shokuhou/pictures/public/$1; 363 + ''; 364 + }; 365 + # Don't use this unless you want the contents of this folder to be in the Nix 366 + # Store and only updated when switching 367 + #root = "/srv/shokuhou/pictures/public"; 368 + #extraConfig = '' 369 + # sendfile on; 370 + # sendfile_max_chunk 1m; 371 + # tcp_nopush on; 372 + # root /srv/shokuhou/pictures/public; 373 + # location ~ /.* { 374 + # } 375 + #''; 355 376 }; 356 377 357 378 # give a name to the virtual host. It also becomes the server name.
+1 -1
users.nix
··· 19 19 users.users.noah = { 20 20 isNormalUser = true; 21 21 shell = pkgs.fish; 22 - extraGroups = [ "wheel" "video" "nas" "nats" "litterbox" ]; # Enable ‘sudo’ for the user. 22 + extraGroups = [ "wheel" "video" "nas" "nats" "litterbox" "httpd" ]; # Enable ‘sudo’ for the user. 23 23 hashedPasswordFile = "/etc/nixos/noah-password"; 24 24 openssh.authorizedKeys.keys = 25 25 lib.strings.splitString "\n" (builtins.readFile (builtins.fetchurl {