-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nixos): Begin setting up NixOS Jellyfin home server
- Loading branch information
1 parent
29f60c2
commit e20e08b
Showing
8 changed files
with
167 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ inputs, config, pkgs, lib, ... }: | ||
|
||
let | ||
inherit (pkgs) stdenv; | ||
inherit (stdenv) isLinux; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ inputs, pkgs, ... }: { | ||
nixpkgs.overlays = [ | ||
(final: prev: | ||
(import ../packages { | ||
inherit inputs; | ||
inherit pkgs; | ||
})) | ||
]; | ||
home = { | ||
username = "mat"; | ||
homeDirectory = "/home/mat"; | ||
# This value determines the Home Manager release that your configuration is | ||
# compatible with. This helps avoid breakage when a new Home Manager release | ||
# introduces backwards incompatible changes. | ||
# | ||
# You should not change this value, even if you update Home Manager. If you do | ||
# want to update the value, then make sure to first check the Home Manager | ||
# release notes. | ||
stateVersion = "22.11"; | ||
}; | ||
xdg.enable = true; | ||
xdg.configFile."nix/nix.conf".text = '' | ||
experimental-features = nix-command flakes | ||
# see https://github.com/nix-community/nix-direnv#via-home-manager | ||
keep-derivations = true | ||
keep-outputs = true | ||
''; | ||
imports = [ | ||
./modules/fish.nix | ||
./modules/nvim.nix | ||
./modules/ssh.nix | ||
./modules/starship.nix | ||
./modules/git.nix | ||
./modules/fzf.nix | ||
./modules/bat.nix | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{ pkgs, ... }: { | ||
networking.hostName = "nixos-server"; | ||
services = { | ||
openssh = { | ||
# only allow SSH key auth | ||
passwordAuthentication = false; | ||
permitRootLogin = "no"; | ||
ports = [ 6969 ]; | ||
}; | ||
|
||
jellyfin = { | ||
enable = true; | ||
# see: https://jellyfin.org/docs/general/networking/index.html | ||
# ports are: | ||
# TCP: 8096, 8920 | ||
# UDP: 1900 7359 | ||
openFirewall = true; | ||
}; | ||
}; | ||
|
||
# enable vaapi on OS-level | ||
nixpkgs.config.packageOverrides = pkgs: { | ||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; | ||
}; | ||
hardware.opengl = { | ||
enable = true; | ||
extraPackages = with pkgs; [ | ||
intel-media-driver | ||
vaapiIntel | ||
vaapiVdpau | ||
libvdpau-va-gl | ||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in) | ||
]; | ||
}; | ||
|
||
users = { | ||
mutableUsers = false; | ||
users = { | ||
mat = { | ||
shell = pkgs.fish; | ||
isNormalUser = true; | ||
# generated via: nix-shell -p pkgs.openssl --run "openssl passwd -1" | ||
hashedPassword = "$1$kWL6uedh$2zhN6tfwSD8dhWG5jONJK."; | ||
home = "/home/mat"; | ||
extraGroups = [ "wheel" ]; | ||
openssh.authorizedKeys.keys = [ | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDsT6GLG7sY8YKX7JM+jqS3EAti3YMzwHKWViveqkZvu" | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters