Compare commits

..

5 commits

Author SHA1 Message Date
5be4192143
Opened Firewall, Added Dashboard-stuff
Some checks failed
/ Check NixOS Configuration (push) Has been cancelled
2024-11-30 02:34:20 +01:00
e8e469f2a9
Trying to Connect to VMs 8080 Port 2024-11-30 02:19:06 +01:00
ec7839fa36
Added SSH Public Key 2024-11-30 02:18:21 +01:00
e77200dcd0
Added Run Instructions 2024-11-30 00:59:13 +01:00
bd8e133730
Fixed Module Enable 2024-11-30 00:58:59 +01:00
4 changed files with 24 additions and 4 deletions

View file

@ -92,6 +92,12 @@ Ram: 3GB of Host
Build: `nixos-rebuild build-vm --flake .#U3ncSovm` Build: `nixos-rebuild build-vm --flake .#U3ncSovm`
Run VM:
```bash
export QEMU_NET_OPTS="hostfwd=tcp::443-:443"
/nix/store/00your00hash00of00build999999999-nixos-vm/bin/run-U3ncSovm-vm
```
## License ## License
[MIT © kB01](../LICENSE) [MIT © kB01](../LICENSE)

View file

@ -20,9 +20,9 @@ in
services.traefik.dynamicConfigOptions = { services.traefik.dynamicConfigOptions = {
http.routers.audiobookshelf.entrypoints = "websecure"; http.routers.audiobookshelf.entrypoints = "websecure";
http.routers.audiobookshelf.tls = true; http.routers.audiobookshelf.tls = true;
http.routers.audiobookshelf.rule = "Host(`audiobookshelf.U3ncSovm`)"; http.routers.audiobookshelf.rule = "Host(`audiobookshelf.localhost`)";
http.routers.audiobookshelf.service = "audiobookshelf"; http.routers.audiobookshelf.service = "audiobookshelf";
services.audiobookshelf.loadBalancer.servers = [ { url = "http://localhost:63001"; } ]; services.audiobookshelf.loadBalancer.servers = [ { url = "http://localhost:63001/"; } ];
}; };
}; };
} }

View file

@ -11,7 +11,7 @@ let
in in
{ {
config = lib.mkIf (cfg.enable && cfg.useTraefik.enable) { config = lib.mkIf (cfg.enable && cfg.useTraefik.enable) {
# Default Config
services.traefik = { services.traefik = {
enable = true; enable = true;
staticConfigOptions = { staticConfigOptions = {
@ -19,6 +19,19 @@ in
entryPoints.websecure.address = ":443"; entryPoints.websecure.address = ":443";
}; };
}; };
networking.firewall.interfaces.eth0.allowedTCPPorts = [ 80 443 ];
# Enable Secure Dashboard
services.traefik.staticConfigOptions.api = {};
services.traefik.dynamicConfigOptions = {
http.routers.dashboard.entrypoints = "websecure";
http.routers.dashboard.tls = true;
http.routers.dashboard.rule = "Host(`traefik.localhost`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))";
http.routers.dashboard.service = "api@internal";
http.routers.dashboard.middlewares = "auth";
http.middlewares.auth.basicauth.users = "master:\$\$2y\$\$05\$\$JwzsNHz7CMJh0RU1eMe3AOfY5H30Qr1Q/glS1r/qEHCNpo5LvWnRW";
};
}; };
} }

View file

@ -28,6 +28,7 @@
users.users.master = { users.users.master = {
initialPassword = "test"; initialPassword = "test";
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF82e+j7y8qsSvLn/DZuosvsH0S2EsHpqDkvZ8jiONm3 kb@LoyAdjo"
]; ];
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user. extraGroups = [ "wheel" ]; # Enable sudo for the user.
@ -48,7 +49,7 @@
# Enable NAS Functionality # Enable NAS Functionality
services.nas = { services.nas = {
enable = true; enable = true;
servers.audiobookshelf = true; servers.audiobookshelf.enable = true;
}; };
# SSH and Mosh # SSH and Mosh