Compare commits
No commits in common. "ad82b2f136532401f2c6f45359af2d8f742bc905" and "d6cb17635750af8238055c85090c247486764307" have entirely different histories.
ad82b2f136
...
d6cb176357
11 changed files with 14 additions and 135 deletions
|
|
@ -59,8 +59,8 @@ in
|
||||||
../system/xps11/configuration.nix
|
../system/xps11/configuration.nix
|
||||||
../home/programs/nginx
|
../home/programs/nginx
|
||||||
../home/programs/jellyfin
|
../home/programs/jellyfin
|
||||||
|
../home/programs/calibre-web
|
||||||
../home/programs/forgejo/webserver.nix
|
../home/programs/forgejo/webserver.nix
|
||||||
../home/programs/immich
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems."/storage" = {
|
fileSystems."/storage" = {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ beets-unstable ];
|
||||||
beets
|
|
||||||
];
|
|
||||||
|
|
||||||
# If using home-manager, we could the beets settings in a more in-nix way. As
|
# If using home-manager, we could the beets settings in a more in-nix way. As
|
||||||
# it is, here's the YAML that's currently on the NAS. If being serious, we
|
# it is, here's the YAML that's currently on the NAS. If being serious, we
|
||||||
|
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
immichDomain = lib.strings.fileContents ../../../../secrets/letsencrypt/mediaserver/immichdomain;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.immich = {
|
|
||||||
enable = true;
|
|
||||||
port = 2283;
|
|
||||||
mediaLocation = "/storage/organized/photos";
|
|
||||||
|
|
||||||
## Enable hardware acceleration for video
|
|
||||||
# `null` will give access to all devices.
|
|
||||||
# You may want to restrict this by using something like `[ "/dev/dri/renderD128" ]`
|
|
||||||
accelerationDevices = null;
|
|
||||||
|
|
||||||
settings.server.externalDomain = "https://${immichDomain}";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
# Maybe we need more here, hard to say...
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.immich.extraGroups = [ "video" "render" "multimedia"
|
|
||||||
# something strange here about remote file-system groups...
|
|
||||||
"jellyfin" ];
|
|
||||||
|
|
||||||
## Expose immich to "the world"
|
|
||||||
networking.firewall = {
|
|
||||||
allowedTCPPorts = [
|
|
||||||
#nginx
|
|
||||||
80
|
|
||||||
443
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
recommendedGzipSettings = true;
|
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedTlsSettings = true;
|
|
||||||
|
|
||||||
virtualHosts."${immichDomain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 50000M;
|
|
||||||
proxy_read_timeout 600s;
|
|
||||||
proxy_send_timeout 600s;
|
|
||||||
send_timeout 600s;
|
|
||||||
'';
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://[::1]:${toString config.services.immich.port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -3,6 +3,9 @@
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
|
# jellyfin frontend
|
||||||
|
8096
|
||||||
|
8920
|
||||||
#nginx
|
#nginx
|
||||||
80
|
80
|
||||||
443
|
443
|
||||||
|
|
@ -19,7 +22,6 @@
|
||||||
# 2. override default hardening measure from NixOS - this is default since 22.05
|
# 2. override default hardening measure from NixOS - this is default since 22.05
|
||||||
systemd.services.jellyfin.serviceConfig.PrivateDevices = lib.mkForce false;
|
systemd.services.jellyfin.serviceConfig.PrivateDevices = lib.mkForce false;
|
||||||
|
|
||||||
## Expose jelly to "the world"
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
virtualHosts."${lib.strings.fileContents ../../../../secrets/letsencrypt/mediaserver/domain}" = {
|
virtualHosts."${lib.strings.fileContents ../../../../secrets/letsencrypt/mediaserver/domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
buildPythonPackage = pkgs.python311Packages.buildPythonPackage;
|
|
||||||
fetchPypi = pkgs.python311Packages.fetchPypi;
|
|
||||||
requests_doh = buildPythonPackage rec {
|
|
||||||
pname = "requests_doh";
|
|
||||||
version = "1.0.0";
|
|
||||||
format = "setuptools";
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-bOi8liRQMKGY7yDSEAtNyzsSCgWljfcD+L4SGnn48vs=";
|
|
||||||
};
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs.python311Packages; [
|
|
||||||
requests
|
|
||||||
dnspython
|
|
||||||
] ++ requests.optional-dependencies.socks ++ dnspython.optional-dependencies.doh;
|
|
||||||
};
|
|
||||||
|
|
||||||
mangadex-downloader = buildPythonPackage
|
|
||||||
rec {
|
|
||||||
pname = "mangadex_downloader";
|
|
||||||
version = "3.1.4";
|
|
||||||
format = "setuptools";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
inherit pname version;
|
|
||||||
sha256 = "sha256-653lHYQPFZ3I9+bqMRxGcSyJv1MEqPvYbbX0j/SATyo=";
|
|
||||||
};
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs.python311Packages; [
|
|
||||||
pysocks
|
|
||||||
requests_doh
|
|
||||||
requests
|
|
||||||
beautifulsoup4
|
|
||||||
chardet
|
|
||||||
packaging
|
|
||||||
requests
|
|
||||||
tqdm
|
|
||||||
pyjwt
|
|
||||||
pillow
|
|
||||||
pathvalidate
|
|
||||||
]++ requests.optional-dependencies.socks;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.python311.withPackages (p: [
|
|
||||||
mangadex-downloader
|
|
||||||
]))
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -127,7 +127,7 @@ with builtins;
|
||||||
pkgs.replaceVars ./nvim-lspconfig.lua {
|
pkgs.replaceVars ./nvim-lspconfig.lua {
|
||||||
# since both of these are used for actually configuring the system,
|
# since both of these are used for actually configuring the system,
|
||||||
# we'll probably always want them around.
|
# we'll probably always want them around.
|
||||||
lua_ls = pkgs.lua-language-server;
|
lua_ls = pkgs.sumneko-lua-language-server;
|
||||||
nixd = pkgs.nixd;
|
nixd = pkgs.nixd;
|
||||||
ts_server = pkgs.nodePackages.typescript-language-server;
|
ts_server = pkgs.nodePackages.typescript-language-server;
|
||||||
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
|
diagnostic_server = pkgs.nodePackages.diagnostic-languageserver;
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ filetype plugin indent on
|
||||||
let g:netrw_liststyle = 3
|
let g:netrw_liststyle = 3
|
||||||
set nobackup
|
set nobackup
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
set pastetoggle=<F3>
|
||||||
set nowrap
|
set nowrap
|
||||||
|
|
||||||
set background=dark
|
set background=dark
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ with builtins; {
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
defaultKeymap = "viins";
|
defaultKeymap = "viins";
|
||||||
|
|
||||||
initContent = readFile ./zshrc;
|
initExtra = readFile ./zshrc;
|
||||||
|
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../common/users.nix
|
../common/users.nix
|
||||||
(import ../../home/programs/mangadex-downloader)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# enable nix-flakes
|
# enable nix-flakes
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
(pkgs.writeTextFile {
|
(pkgs.writeTextFile {
|
||||||
name = "dev-device-no-auto-name";
|
name = "dev-device-no-auto-name";
|
||||||
text = ''
|
text = ''
|
||||||
SUBSYSTEM=="net", ACTION=="add", ENV{DEVTYPE}!="?*", ATTR{address}=="04:7c:16:10:27:5e", NAME="eth0"
|
SUBSYSTEM=="net", ACTION=="add", DEVTYPE!=="?*", ATTR{address}=="04:7c:16:10:27:5e", NAME="eth0"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
destination = "/etc/udev/rules.d/70-persistent-net.rules";
|
destination = "/etc/udev/rules.d/70-persistent-net.rules";
|
||||||
|
|
@ -50,12 +50,12 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.utf8";
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
xkb.layout = "us";
|
layout = "us";
|
||||||
xkb.variant = "";
|
xkbVariant = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
|
|
@ -94,4 +94,5 @@
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "22.05"; # Did you read the comment?
|
system.stateVersion = "22.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
name = "dev-device-no-auto-name";
|
name = "dev-device-no-auto-name";
|
||||||
# xps11 uses a usb device as an ethernet port
|
# xps11 uses a usb device as an ethernet port
|
||||||
text = ''
|
text = ''
|
||||||
SUBSYSTEM=="net", ACTION=="add", ENV{DEVTYPE}!="?*", ATTR{address}=="00:e0:4c:68:13:bf", NAME="eth0"
|
SUBSYSTEM=="net", ACTION=="add", DEVTYPE!=="?*", ATTR{address}=="00:e0:4c:68:13:bf", NAME="eth0"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
destination = "/etc/udev/rules.d/70-persistent-net.rules";
|
destination = "/etc/udev/rules.d/70-persistent-net.rules";
|
||||||
|
|
@ -116,6 +116,4 @@
|
||||||
# servers. You should change this only after NixOS release notes say you
|
# servers. You should change this only after NixOS release notes say you
|
||||||
# should.
|
# should.
|
||||||
system.stateVersion = "20.03"; # Did you read the comment?
|
system.stateVersion = "20.03"; # Did you read the comment?
|
||||||
# postgres 11 has EOL'd
|
|
||||||
services.postgresql.package = pkgs.postgresql_15;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue