jellyfin is working on my domain name

This commit is contained in:
pagedMov
2024-11-02 17:12:00 -04:00
parent f3221dbd29
commit e0c183e467
144 changed files with 59 additions and 125 deletions

5
modules/server/cdn/default.nix Executable file
View File

@@ -0,0 +1,5 @@
{ pkgs, lib, config, ... }:
{
imports = [ ./jellyfin.nix ];
}

13
modules/server/cdn/jellyfin.nix Executable file
View File

@@ -0,0 +1,13 @@
{ pkgs, lib, config, ... }:
{
options = {
jellyfinConfig.enable = lib.mkEnableOption "Enables the server's jellyfin config";
};
config = lib.mkIf config.jellyfinConfig.enable {
services.jellyfin = {
enable = true;
openFirewall = true;
};
};
}

20
modules/server/default.nix Normal file → Executable file
View File

@@ -1,17 +1,11 @@
{ pkgs, lib, ... }:
{
config,
inputs,
scheme ? {},
wallpaper,
username,
host,
...
}: {
imports = [
../sys/software/nixvim
../sys/hardware/bootloader.nix
./services.nix
./home.nix
./packages.nix
./cdn
./glasshaus
];
jellyfinConfig.enable = lib.mkDefault false;
caddyConfig.enable = lib.mkDefault false;
}

View File

@@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
{
options = {
caddyConfig.enable = lib.mkEnableOption "Enable my caddy config for the glasshaus.info domain name";
};
config = lib.mkIf config.caddyConfig.enable {
services.caddy = {
enable = true;
configFile = pkgs.writeText "Caddyfile" ''
glasshaus.info {
reverse_proxy localhost:8096
}
'';
};
};
}

View File

@@ -0,0 +1,5 @@
{ pkgs, lib, config, ... }:
{
imports = [ ./caddy.nix ];
}

View File

@@ -1,31 +0,0 @@
{ pkgs, inputs, config, host, self, ... }: {
imports = [inputs.home-manager.nixosModules.home-manager];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = {inherit host self inputs;};
users."pagedmov" = {
programs.home-manager.enable = true;
imports = [
../home/environment/zshell.nix
../home/environment/starship.nix
../home/programs/eza.nix
../home/scripts
];
home = {
username = "pagedmov";
homeDirectory = "/home/pagedmov";
stateVersion = "24.05";
};
};
};
users.users = {
pagedmov = {
isNormalUser = true;
initialPassword = "1234";
extraGroups = ["wheel"];
};
root.initialPassword = "1234";
};
}

View File

@@ -1,51 +0,0 @@
{ pkgs, ... }:
let
extraFigletFonts = pkgs.fetchFromGitHub {
owner = "xero";
repo = "figlet-fonts";
rev = "master";
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
};
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts];
installPhase = ''
make install PREFIX=$out
mkdir -p $out/share/figlet
cp -r ${extraFigletFonts}/* $out/share/figlet
'';
});
in
{
environment.systemPackages = with pkgs; [
toilet-extrafonts
gtrash
alsa-utils
python3
fail2ban
inetutils
lolcat
lsof
mullvad
neofetch
nh
nix-output-monitor
nix-prefetch-scripts
nixos-option
nix-search-cli
openssl
p7zip
jq
git
pamixer
parted
pkg-config
socat
sox
stress
tree
unrar
unzip
usbutils
];
}

View File

@@ -1,9 +0,0 @@
{...}: {
programs = {
zsh.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
}

View File

@@ -1,20 +0,0 @@
{
config,
pkgs,
username,
...
}: {
systemd.user.tmpfiles.users."${username}".rules = [
"d /home/${username}/media 0770 ${username} users -"
"d /home/${username}/backup 0770 ${username} users -"
"d /home/${username}/cloud 0770 ${username} users -"
"d /home/${username}/repositories 0770 ${username} users -"
"d /home/${username}/game_servers 0770 ${username} users -"
"d /home/${username}/inbox 0770 ${username} users -"
"d /home/${username}/outbox 0770 ${username} users -"
];
services.openssh = {
enable = true;
allowSFTP = true;
};
}