Create jellyfin VM
Update DNS for new Jellyfin box Update DHCP for new Jellyfin box Modify Isaiah to work better with VMs Update pinned packages becaue I derped hard on creating a cyclic dependency
This commit is contained in:
Generated
+9
-9
@@ -737,11 +737,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731892054,
|
"lastModified": 1732151224,
|
||||||
"narHash": "sha256-BJtD9NGUWaBe4OZ1JO77w8qBP9yHDJJUjsxkG/milFc=",
|
"narHash": "sha256-5IgpueM8SGLOadzUJK6Gk37zEBXGd56BkNOtoWmnZos=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "15a87ccb45e06d24a9fd5f99a49782efe11b23f0",
|
"rev": "3280fdde8c8f0276c9f5286ad5c0f433dfa5d56c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -876,11 +876,11 @@
|
|||||||
},
|
},
|
||||||
"nixstable": {
|
"nixstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727672256,
|
"lastModified": 1731797254,
|
||||||
"narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=",
|
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1719f27dd95fd4206afb9cec9f415b539978827e",
|
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -918,11 +918,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730550779,
|
"lastModified": 1731959181,
|
||||||
"narHash": "sha256-2stntmqw/GBOVEoPV4oCLHZljpeSBfZn8wkcJpei+ng=",
|
"narHash": "sha256-RryrMTaCvmXzhl0lYm/jAG8bAxsAhEcNq1JRtkCL4wI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "91c06026075f08a3c865fdc46cc6db8e2af35a1e",
|
"rev": "8d29728abfcc2e4207afb3fd8606feff17c15cec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
pkgs = import top.nixstable { inherit system overlays; };
|
pkgs = import top.nixstable { inherit system overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = import ./pkgs { inherit pkgs top; };
|
packages = (import ./pkgs { inherit pkgs top; }) // (import ./vms { inherit top; });
|
||||||
|
|
||||||
checks = import ./checks.nix {
|
checks = import ./checks.nix {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ in
|
|||||||
jeremiah = unstable { name = "jeremiah"; };
|
jeremiah = unstable { name = "jeremiah"; };
|
||||||
isaiah = unstable { name = "isaiah"; };
|
isaiah = unstable { name = "isaiah"; };
|
||||||
|
|
||||||
|
vm-jellyfin = vm { name = "vm-jellyfin"; };
|
||||||
vm-matrix = vm { name = "vm-matrix"; };
|
vm-matrix = vm { name = "vm-matrix"; };
|
||||||
|
|
||||||
iso = machine { name = "iso"; };
|
iso = machine { name = "iso"; };
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ in
|
|||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
dhcpPort
|
dhcpPort
|
||||||
dnsPort
|
dnsPort
|
||||||
1900 # Jellyfin auto-discovery
|
|
||||||
7359 # Jellyfin auto-discovery
|
|
||||||
];
|
];
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
dnsPort
|
dnsPort
|
||||||
@@ -74,21 +72,7 @@ in
|
|||||||
|
|
||||||
environment.etc."hosts.d/local".text = extraHosts;
|
environment.etc."hosts.d/local".text = extraHosts;
|
||||||
|
|
||||||
fileSystems = {
|
|
||||||
"/media" = {
|
|
||||||
device = "10.42.1.4:/volume1/video/";
|
|
||||||
fsType = "nfs";
|
|
||||||
options = [ "ro" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
# Video services
|
|
||||||
jellyfin = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# Blind service proxy behind the walls of the VPN
|
# Blind service proxy behind the walls of the VPN
|
||||||
########
|
########
|
||||||
@@ -146,10 +130,6 @@ in
|
|||||||
};
|
};
|
||||||
}; # End of services configuration
|
}; # End of services configuration
|
||||||
|
|
||||||
greg.proxies = {
|
|
||||||
"jellyfin.home".target = "http://localhost:8096/";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
bind
|
bind
|
||||||
curl # Used by dnsmasq fetching
|
curl # Used by dnsmasq fetching
|
||||||
|
|||||||
@@ -108,18 +108,26 @@
|
|||||||
# hw-address = ""; # hosea
|
# hw-address = ""; # hosea
|
||||||
# ip-address = "10.42.1.7";
|
# ip-address = "10.42.1.7";
|
||||||
#}
|
#}
|
||||||
#{
|
{
|
||||||
# hw-address = ""; # jeremiah
|
hw-address = "b4:2e:99:aa:22:3c"; # jeremiah
|
||||||
# ip-address = "10.42.1.8";
|
ip-address = "10.42.1.8";
|
||||||
#}
|
}
|
||||||
{
|
{
|
||||||
hw-address = "c8:5e:a9:54:9e:c6"; # IVR laptop Wi-Fi
|
hw-address = "c8:5e:a9:54:9e:c6"; # IVR laptop Wi-Fi
|
||||||
ip-address = "10.42.1.9";
|
ip-address = "10.42.1.9";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
########################################
|
||||||
|
# VM servers #
|
||||||
|
########################################
|
||||||
|
|
||||||
{
|
{
|
||||||
hw-address = "52:54:00:2a:74:2f";
|
hw-address = "52:54:00:2a:74:2f";
|
||||||
ip-address = "10.43.4.1";
|
ip-address = "10.43.4.1"; # Dendrite
|
||||||
|
}
|
||||||
|
{
|
||||||
|
hw-address = "52:54:00:6e:eb:83";
|
||||||
|
ip-address = "10.43.4.2"; # Jellyfin
|
||||||
}
|
}
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|||||||
@@ -12,7 +12,10 @@
|
|||||||
|
|
||||||
virtualisation.libvirtd = {
|
virtualisation.libvirtd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedBridges = [ "virbr0" ];
|
allowedBridges = [
|
||||||
|
"br0"
|
||||||
|
"virbr0"
|
||||||
|
];
|
||||||
onBoot = "ignore"; # only restart VMs labeled 'autostart'
|
onBoot = "ignore"; # only restart VMs labeled 'autostart'
|
||||||
qemu.ovmf.enable = true;
|
qemu.ovmf.enable = true;
|
||||||
};
|
};
|
||||||
@@ -26,12 +29,15 @@
|
|||||||
networking = {
|
networking = {
|
||||||
hostName = "isaiah";
|
hostName = "isaiah";
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
|
bridges.br0 = {
|
||||||
|
interfaces = [ "enp38s0" ];
|
||||||
|
};
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = " 10.42.1.1";
|
address = " 10.42.1.1";
|
||||||
interface = "enp38s0";
|
interface = "br0";
|
||||||
};
|
};
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp38s0 = {
|
br0 = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = "10.42.1.6";
|
address = "10.42.1.6";
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
#boot.loader.grub.devices = [ "/dev/vda" ];
|
||||||
|
|
||||||
|
greg = {
|
||||||
|
proxies."jellyfin.home".target = "http://localhost:8096/";
|
||||||
|
tailscale.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/music" = {
|
||||||
|
device = "10.42.1.4:/volume1/music";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "ro" ];
|
||||||
|
};
|
||||||
|
"/photo" = {
|
||||||
|
device = "10.42.1.4:/volume1/photo";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "ro" ];
|
||||||
|
};
|
||||||
|
"/video" = {
|
||||||
|
device = "10.42.1.4:/volume1/video/";
|
||||||
|
fsType = "nfs";
|
||||||
|
options = [ "ro" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "vm-jellyfin";
|
||||||
|
domain = "thehellings.lan";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.diskSize = 100 * 1024;
|
||||||
|
}
|
||||||
@@ -41,7 +41,7 @@ in
|
|||||||
xfsprogs
|
xfsprogs
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
gc.dates = "weekly";
|
gc.dates = "weekly";
|
||||||
@@ -93,6 +93,7 @@ in
|
|||||||
"networkmanager"
|
"networkmanager"
|
||||||
]; # Enable ‘sudo’ for the user.
|
]; # Enable ‘sudo’ for the user.
|
||||||
shell = config.programs.xonsh.package;
|
shell = config.programs.xonsh.package;
|
||||||
|
initialPassword = "password";
|
||||||
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (
|
openssh.authorizedKeys.keys = lib.strings.splitString "\n" (
|
||||||
builtins.readFile ../../home/ssh/authorized_keys
|
builtins.readFile ../../home/ssh/authorized_keys
|
||||||
);
|
);
|
||||||
|
|||||||
+1
-3
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, top, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
c = pkgs.callPackage;
|
c = pkgs.callPackage;
|
||||||
@@ -16,6 +16,4 @@ in
|
|||||||
setup-ssh = c ./setup-ssh { };
|
setup-ssh = c ./setup-ssh { };
|
||||||
upgrade-pg-cluster = c ./upgrade-pg-cluster.nix { };
|
upgrade-pg-cluster = c ./upgrade-pg-cluster.nix { };
|
||||||
zim = c ./zim.nix { };
|
zim = c ./zim.nix { };
|
||||||
|
|
||||||
matrix = top.nixosConfigurations.vm-matrix.config.formats.qcow;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{ top, ... }:
|
||||||
|
with top.self.nixosConfigurations;
|
||||||
|
{
|
||||||
|
jellyfin = vm-jellyfin.config.formats.qcow;
|
||||||
|
matrix = vm-matrix.config.formats.qcow;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user