Compare commits
No commits in common. "77ac1db6980902ce57ae5ec80d12337d3eebc5b6" and "0efadb66ebffa566d392f335b8c10c4d14fbeb25" have entirely different histories.
77ac1db698
...
0efadb66eb
13 changed files with 31 additions and 110 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
let
|
||||
theme = import ../modules/theme;
|
||||
tailscale = import ../modules/tailscale;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
@ -60,7 +59,6 @@ in
|
|||
networking.extraHosts = ''
|
||||
192.168.0.26 elnuhub
|
||||
24.199.72.8 elnudrop
|
||||
${tailscale.hosts}
|
||||
'';
|
||||
|
||||
#sound.enable = true;
|
||||
|
@ -79,8 +77,8 @@ in
|
|||
};
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
enableDefaultFonts = false;
|
||||
fonts = with pkgs; [
|
||||
noto-fonts-cjk
|
||||
noto-fonts
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; }) # required for icons
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ (import ./hardware-configuration.nix) ];
|
||||
|
@ -15,13 +15,6 @@
|
|||
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.tailscale.enable = true;
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true; # Required for Touhou
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
}
|
|
@ -1,37 +1,48 @@
|
|||
{ lib, user, ... }:
|
||||
|
||||
let keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEQNlGt62dBMojVCX7EUIia+wfSDfLzV4YCPi8SZ2xrp elnu@elnu.com"
|
||||
]; in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
# Remember to update for new instances
|
||||
./networking.nix # generated at runtime by nixos-infect
|
||||
|
||||
./modules/ssh.nix
|
||||
./modules/headscale.nix
|
||||
./modules/tailscale.nix
|
||||
|
||||
./hosts/jichan.org
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "elnu@elnu.com";
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."default" = {
|
||||
default = true;
|
||||
serverName = null;
|
||||
# https://stackoverflow.com/a/42802777
|
||||
locations."/".return = "444";
|
||||
virtualHosts = {
|
||||
"default" = {
|
||||
default = true;
|
||||
serverName = null;
|
||||
# https://stackoverflow.com/a/42802777
|
||||
locations."/".return = "444";
|
||||
};
|
||||
"jichan.org" = {
|
||||
extraConfig = ''
|
||||
error_page 502 /502.html;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://127.0.0.1:8000";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/502.html".root = "${./hosts/jichan.org}";
|
||||
"/logo.svg".root = "${./hosts/jichan.org}";
|
||||
"/missing.min.css".root = "${./hosts/jichan.org}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.do-agent.enable = true;
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = keys;
|
||||
users.users.${user}.openssh.authorizedKeys.keys = keys;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
services.nginx.virtualHosts."jichan.org" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
extraConfig = ''
|
||||
error_page 502 /502.html;
|
||||
'';
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = with import ../../../../modules/tailscale/default.nix; "http://${elnuhub}:3334";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
"/502.html".root = "${./502}";
|
||||
"/logo.svg".root = "${./502}";
|
||||
"/missing.min.css".root = "${./502}";
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
@ -1,25 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
let
|
||||
baseDomain = "elnu.com";
|
||||
domain = "headscale.${baseDomain}";
|
||||
in {
|
||||
services.headscale = {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
port = 8080;
|
||||
settings = {
|
||||
server_url = "https://${domain}";
|
||||
dns_config.base_domain = baseDomain;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [ config.services.headscale.package ];
|
||||
services.nginx.virtualHosts.${domain} = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${ toString config.services.headscale.port }";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ user, ... }:
|
||||
|
||||
let keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEQNlGt62dBMojVCX7EUIia+wfSDfLzV4YCPi8SZ2xrp elnu@elnu.com"
|
||||
]; in
|
||||
{
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = keys;
|
||||
users.users.${user}.openssh.authorizedKeys.keys = keys;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.tailscale.enable = true;
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
}
|
|
@ -21,7 +21,7 @@ in
|
|||
../modules/terminal
|
||||
../modules/todo-txt
|
||||
|
||||
#../modules/fantasia-archive
|
||||
../modules/fantasia-archive
|
||||
];
|
||||
|
||||
home.file."./.background-image".source = theme.wallpaper;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
rec {
|
||||
elnu = "100.64.0.1";
|
||||
elnudrop = "100.64.0.2";
|
||||
elnuhub = "100.64.0.3";
|
||||
hosts = ''
|
||||
elnu ${elnu}
|
||||
'';
|
||||
}
|
Loading…
Add table
Reference in a new issue