Compare commits
5 commits
57a2d11ae6
...
5be4192143
Author | SHA1 | Date | |
---|---|---|---|
5be4192143 | |||
e8e469f2a9 | |||
ec7839fa36 | |||
e77200dcd0 | |||
bd8e133730 |
4 changed files with 24 additions and 4 deletions
|
@ -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)
|
||||||
|
|
|
@ -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/"; } ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue