Compare commits
2 Commits
338246498d
...
319d292fa0
Author | SHA1 | Date | |
---|---|---|---|
319d292fa0 | |||
1eb4476006 |
@ -31,10 +31,6 @@
|
|||||||
443 # HTTPS
|
443 # HTTPS
|
||||||
25565 # Minecraft
|
25565 # Minecraft
|
||||||
];
|
];
|
||||||
extraCommands = ''
|
|
||||||
iptables -I INPUT 1 -i 172.16.0.0/12 -p tcp -d 172.17.0.1 -j ACCEPT
|
|
||||||
iptables -I INPUT 1 -i 172.16.0.0/12 -p tcp -d 172.17.0.1 -j ACCEPT
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
packages.nix = {
|
packages.nix = {
|
||||||
@ -43,6 +39,10 @@
|
|||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
endlessh.enable = true;
|
endlessh.enable = true;
|
||||||
|
plex = {
|
||||||
|
enable = true;
|
||||||
|
dataDir = "/tank/web/stacks/plex/plex-config";
|
||||||
|
};
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedUsers = ["phundrak"];
|
allowedUsers = ["phundrak"];
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./endlessh.nix
|
./endlessh.nix
|
||||||
./fwupd.nix
|
./fwupd.nix
|
||||||
|
./plex.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./sunshine.nix
|
./sunshine.nix
|
||||||
|
35
system/services/plex.nix
Normal file
35
system/services/plex.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.system.services.plex;
|
||||||
|
in {
|
||||||
|
options.system.services.plex = {
|
||||||
|
enable = mkEnableOption "Enable Plex";
|
||||||
|
group = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "users";
|
||||||
|
example = "users";
|
||||||
|
description = "Group under which Plex runs";
|
||||||
|
};
|
||||||
|
dataDir = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
example = "/tank/plex-config";
|
||||||
|
};
|
||||||
|
user = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "phundrak";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
services.plex = mkIf cfg.enable {
|
||||||
|
inherit (cfg) enable user group dataDir;
|
||||||
|
openFirewall = cfg.enable;
|
||||||
|
};
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"kernel.unprivileged_userns_clone" = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
imports = [../light-home.nix];
|
imports = [../light-home.nix];
|
||||||
home = {
|
home = {
|
||||||
cli.nh.flake = "${config.home.homeDirectory}/nixos";
|
cli.nh.flake = "/tank/phundrak/nixos";
|
||||||
phundrak.sshKey = {
|
phundrak.sshKey = {
|
||||||
content = builtins.readFile ../../../keys/id_tilo.pub;
|
content = builtins.readFile ../../../keys/id_tilo.pub;
|
||||||
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
# file = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user