mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
Add several NixOS hosts on Proxmox and Oracle Cloud
This commit is contained in:
parent
9afb9ec47e
commit
acc0ad68e0
43 changed files with 4356 additions and 187 deletions
77
profiles/server1/jellyfin/nixos.nix
Normal file
77
profiles/server1/jellyfin/nixos.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
gnupg
|
||||
ssh-to-age
|
||||
];
|
||||
|
||||
users.groups.lxc_shares = {
|
||||
gid = 10000;
|
||||
members = [
|
||||
"jellyfin"
|
||||
"root"
|
||||
];
|
||||
};
|
||||
|
||||
users.users.jellyfin = {
|
||||
extraGroups = [ "video" "render" ];
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# sops.age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
# sops.defaultSopsFile = "/.dotfiles/secrets/jellyfin/secrets.yaml";
|
||||
# sops.validateSopsFiles = false;
|
||||
|
||||
proxmoxLXC.manageNetwork = true; # manage network myself
|
||||
proxmoxLXC.manageHostName = false; # manage hostname myself
|
||||
networking.hostName = "jellyfin"; # Define your hostname.
|
||||
networking.useDHCP = true;
|
||||
networking.enableIPv6 = false;
|
||||
networking.firewall.enable = false;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../../secrets/keys/authorized_keys
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
|
||||
environment.shellAliases = {
|
||||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
user = "jellyfin";
|
||||
# openFirewall = true; # this works only for the default ports
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue