Compare commits
4 commits
404badefec
...
efbfb72030
Author | SHA1 | Date | |
---|---|---|---|
efbfb72030 | |||
6bf9d771a1 | |||
408ea16f6d | |||
533cfbb560 |
8 changed files with 112 additions and 27 deletions
8
flake.lock
generated
8
flake.lock
generated
|
@ -396,11 +396,11 @@
|
|||
"nixvim": "nixvim"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734791154,
|
||||
"narHash": "sha256-J/h0nh3iOnOqXnv28NahNH45xZ035tKpabPPKMPFTfo=",
|
||||
"lastModified": 1735219902,
|
||||
"narHash": "sha256-s1aI4l9e0OX861wHsvAPqz/s8B9ZTltAMJzPRXt5Kqo=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "fdf7775c738e2eb6bb8cb707d35a900bc47cd53e",
|
||||
"revCount": 24,
|
||||
"rev": "4439691030d1a28f4ad49c542104e3f880f7c183",
|
||||
"revCount": 25,
|
||||
"type": "git",
|
||||
"url": "https://git.xiny.li/xin/nixvim"
|
||||
},
|
||||
|
|
|
@ -152,11 +152,14 @@ in
|
|||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
defualt = {
|
||||
id = [ "*" ];
|
||||
capslock = "overload(control, esc)";
|
||||
};
|
||||
"internal" = {
|
||||
ids = [ "0b05:1866" ];
|
||||
settings = {
|
||||
main = {
|
||||
capslock = "overload(control, esc)";
|
||||
leftcontrol = "capslock";
|
||||
};
|
||||
};
|
||||
|
@ -170,17 +173,6 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
"keydous" = {
|
||||
ids = [
|
||||
"25a7:fa14"
|
||||
"3151:4002"
|
||||
];
|
||||
settings = {
|
||||
main = {
|
||||
leftcontrol = "overload(control, esc)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -302,7 +294,8 @@ in
|
|||
zotero
|
||||
# onlyoffice-bin
|
||||
|
||||
wemeet
|
||||
# wemeet
|
||||
config.nur.repos.linyinfeng.wemeet
|
||||
|
||||
virt-manager
|
||||
wineWowPackages.waylandFull
|
||||
|
|
|
@ -12,6 +12,13 @@
|
|||
./services
|
||||
];
|
||||
|
||||
options = {
|
||||
node = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking.hostName = "weilite";
|
||||
commonSettings = {
|
||||
|
@ -21,6 +28,9 @@
|
|||
};
|
||||
comin.enable = true;
|
||||
};
|
||||
node = {
|
||||
mediaDir = "/mnt/nixos/media";
|
||||
};
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
|
@ -101,12 +111,7 @@
|
|||
type = "virtiofs";
|
||||
options = "rw,nodev,nosuid";
|
||||
}
|
||||
{
|
||||
what = "media";
|
||||
where = "/var/lib/jellyfin/media";
|
||||
type = "virtiofs";
|
||||
options = "rw,nodev,nosuid";
|
||||
}
|
||||
|
||||
{
|
||||
what = "/mnt/nixos/ocis";
|
||||
where = "/var/lib/ocis";
|
||||
|
|
|
@ -4,6 +4,8 @@ immich:
|
|||
oauth_client_secret: ENC[AES256_GCM,data:EFs2hPjGMj0idwY3oQVIDTOIWkdwoAoAVjDQE9Z2eAKzUDH3grmYpYE+33V8d/Ux,iv:A9cjwFr/ZqltG62/N8MQ1LhdDbSIVVAqIPVB492zYJw=,tag:VTTtE697BZTVsI32UF53/w==,type:str]
|
||||
restic:
|
||||
localpass: ENC[AES256_GCM,data:GIQAmkpDmGu4+sSG5/b5yQ==,iv:dcu6F8NnVjeQzEG2vM3fOV5owI0PWc86ts20UP3vN18=,tag:vsG8x062FG1pH5YNcAajeg==,type:str]
|
||||
transmission:
|
||||
rpc-password: ENC[AES256_GCM,data:4dumy0hygGOuwU3ANky3xEKRDRBAJWE=,iv:HVV2J+F8HndHZNsMD2YmkWrJOzk5JIapGd0SuQP8VqU=,tag:xqp5pxh5cYYogA4alrmIfg==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
|
@ -28,8 +30,8 @@ sops:
|
|||
V0thRjU4WGpQRGFpcnoxSjZTZHhTTkUKzNMHh9p7GUY3hL5XZ9S4x20CwaItsXFV
|
||||
RKujsFVVBd8Kuq/jyOCBTRCscuHI4LW/wYeZYHFEZFSTK2liAqspgw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-12-03T05:59:51Z"
|
||||
mac: ENC[AES256_GCM,data:0dLbfkm7fJvH5Mmct0/qHulg2AtDCeeeOgWMXfeGRUaX3GlLDiLga0zW4uNPDuahVecdh6ofvYfBOxFaGUdBCHk9vq5GzrwrzBNhqObWQ3AqVuq5rjqSxEKoFM4Eb5qoqaOefFzT/9qC94NDETTsHhjiEeIgd4fgSr2dazNiFPE=,iv:Ggw0FHzkrhKh5Uzo3seHGwwHsWW/tTAgAl0iIq9PVk4=,tag:rJvUI5/wsLJ01XyKmkRghw==,type:str]
|
||||
lastmodified: "2024-12-25T00:35:15Z"
|
||||
mac: ENC[AES256_GCM,data:sk4DL+w740RD9A3sPvcGD4fc90Nfw9C8dH11ScGRgt6gS3v4V16pD0Q/bHHZiUCll76phZKjp+sGcZaPw0X7RDlK582WY3uw0pLtqLlm0gejjmvBJYKg47nA0dCD+vDvbMkJlvJG6N3sRuXDBa/7bAe452eXZNS8Xnm7ceDscVc=,iv:Nx4yCfG9rNk0q8akuI1aZr6Wj4GIAxASE8Tc7TH4Vj8=,tag:GodvlMbhIPpPu062spKFxA==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.1
|
||||
version: 3.9.2
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
./media-download.nix
|
||||
./immich.nix
|
||||
./jellyfin.nix
|
||||
./transmission.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.jellyfin;
|
||||
in
|
||||
{
|
||||
services.jellyfin.enable = true;
|
||||
|
||||
systemd.services.jellyfin.serviceConfig = {
|
||||
BindReadOnlyPaths = [
|
||||
"/mnt/nixos/media:${cfg.dataDir}/media"
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
jellyfin
|
||||
jellyfin-web
|
||||
|
@ -12,4 +21,5 @@
|
|||
'';
|
||||
networking.firewall.allowedTCPPorts = [ 8920 ]; # allow on lan
|
||||
users.users.jellyfin.extraGroups = [ "render" ];
|
||||
users.groups.media.members = [ cfg.user ];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.jackett = {
|
||||
enable = true;
|
||||
|
@ -27,4 +27,9 @@
|
|||
services.radarr = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
users.groups.media.members = [
|
||||
config.services.sonarr.user
|
||||
config.services.radarr.user
|
||||
];
|
||||
}
|
||||
|
|
69
machines/weilite/services/transmission.nix
Normal file
69
machines/weilite/services/transmission.nix
Normal file
|
@ -0,0 +1,69 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.transmission;
|
||||
in
|
||||
{
|
||||
sops.secrets = {
|
||||
"transmission/rpc-password" = { };
|
||||
};
|
||||
|
||||
sops.templates."transmission-cred.json" = {
|
||||
content = builtins.toJSON {
|
||||
rpc-password = config.sops.placeholder."transmission/rpc-password";
|
||||
};
|
||||
};
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
package = pkgs.transmission_4;
|
||||
openPeerPorts = true;
|
||||
credentialsFile = config.sops.templates."transmission-cred.json".path;
|
||||
settings = {
|
||||
download-dir = "/mnt/nixos/media";
|
||||
incomplete-dir = "/mnt/nixos/transmission/incomplete";
|
||||
alt-speed-down = 40960;
|
||||
alt-speed-enabled = true;
|
||||
alt-speed-time-begin = 60;
|
||||
alt-speed-time-day = 127;
|
||||
alt-speed-time-enabled = true;
|
||||
alt-speed-time-end = 420;
|
||||
alt-speed-up = 4096;
|
||||
bind-address-ipv4 = "0.0.0.0";
|
||||
bind-address-ipv6 = "::";
|
||||
download-queue-enabled = true;
|
||||
download-queue-size = 10;
|
||||
incomplete-dir-enabled = true;
|
||||
lpd-enabled = false;
|
||||
message-level = 4;
|
||||
peer-congestion-algorithm = "";
|
||||
peer-id-ttl-hours = 6;
|
||||
peer-limit-global = 200;
|
||||
peer-limit-per-torrent = 50;
|
||||
peer-port = 51413;
|
||||
peer-socket-tos = "cs1";
|
||||
pex-enabled = true;
|
||||
preallocation = 1;
|
||||
prefetch-enabled = true;
|
||||
queue-stalled-enabled = true;
|
||||
queue-stalled-minutes = 30;
|
||||
rename-partial-files = true;
|
||||
rpc-bind-address = "127.0.0.1";
|
||||
rpc-enabled = true;
|
||||
rpc-authentication-required = true;
|
||||
rpc-port = 9092;
|
||||
rpc-username = "xin";
|
||||
rpc-whitelist = "127.0.0.1";
|
||||
speed-limit-down = 20480;
|
||||
speed-limit-down-enabled = true;
|
||||
speed-limit-up = 3072;
|
||||
speed-limit-up-enabled = true;
|
||||
start-added-torrents = true;
|
||||
watch-dir-enabled = false;
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."https://weilite.coho-tet.ts.net:9091".extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:${toString cfg.settings.rpc-port}
|
||||
'';
|
||||
networking.firewall.allowedTCPPorts = [ 9091 ]; # allow on lan
|
||||
users.groups.media.members = [ cfg.user ];
|
||||
}
|
Loading…
Add table
Reference in a new issue