updates and stuff

This commit is contained in:
mjallen18
2024-12-27 13:32:29 -06:00
parent c80092f588
commit 9caa802d46
9 changed files with 206 additions and 41 deletions

48
flake.lock generated
View File

@@ -220,11 +220,11 @@
]
},
"locked": {
"lastModified": 1734344598,
"narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
"lastModified": 1735053786,
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "83ecd50915a09dca928971139d3a102377a8d242",
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
"type": "github"
},
"original": {
@@ -235,11 +235,11 @@
},
"impermanence": {
"locked": {
"lastModified": 1734200366,
"narHash": "sha256-0NursoP4BUdnc+wy+Mq3icHkXu/RgP1Sjo0MJxV2+Dw=",
"lastModified": 1734945620,
"narHash": "sha256-olIfsfJK4/GFmPH8mXMmBDAkzVQ1TWJmeGT3wBGfQPY=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "c6323585fa0035d780e3d8906eb1b24b65d19a48",
"rev": "d000479f4f41390ff7cf9204979660ad5dd16176",
"type": "github"
},
"original": {
@@ -306,11 +306,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1733570843,
"narHash": "sha256-sQJAxY1TYWD1UyibN/FnN97paTFuwBw3Vp3DNCyKsMk=",
"lastModified": 1735218083,
"narHash": "sha256-MoUAbmXz9TEr7zlKDRO56DBJHe30+7B5X7nhXm+Vpc8=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "a35b08d09efda83625bef267eb24347b446c80b8",
"rev": "bc03f7818771a75716966ce8c23110b715eff2aa",
"type": "github"
},
"original": {
@@ -348,11 +348,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1733377410,
"narHash": "sha256-tZ9JEAaHIs3TPdRZeZzHsnJmUilkcnVaUTvyprbRb1A=",
"lastModified": 1735172763,
"narHash": "sha256-a6n8RsiAolz6p24Fsr/gTndx9xr9USpKqKK6kzBeXQc=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "e8c07c3ae199b55a8c1c35a7c067c5cef9c7e929",
"rev": "3daf0637409689d7a1304cedc50d20542bc47905",
"type": "github"
},
"original": {
@@ -363,11 +363,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1734352517,
"narHash": "sha256-mfv+J/vO4nqmIOlq8Y1rRW8hVsGH3M+I2ESMjhuebDs=",
"lastModified": 1734954597,
"narHash": "sha256-QIhd8/0x30gEv8XEE1iAnrdMlKuQ0EzthfDR7Hwl+fk=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "b12e314726a4226298fe82776b4baeaa7bcf3dcd",
"rev": "def1d472c832d77885f174089b0d34854b007198",
"type": "github"
},
"original": {
@@ -421,11 +421,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1734323986,
"narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"lastModified": 1735141468,
"narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce",
"type": "github"
},
"original": {
@@ -437,11 +437,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1734424634,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {
@@ -453,11 +453,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733212471,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=",
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"type": "github"
},
"original": {

View File

@@ -359,12 +359,18 @@ in
shell = pkgs.zsh;
};
hardware.sane = {
enable = true;
brscan5.enable = true;
dsseries.enable = false;
# backends-package = pkgs.brscan5;
extraBackends = [ pkgs.brscan5 ];
hardware = {
keyboard = {
qmk.enable = true;
};
sane = {
enable = true;
brscan5.enable = true;
dsseries.enable = false;
# backends-package = pkgs.brscan5;
extraBackends = [ pkgs.brscan5 ];
};
};
# This option defines the first version of NixOS you have installed on this particular machine,

View File

@@ -98,12 +98,15 @@ in
python312Packages.pytest
python312Packages.pytest-cov
python312Packages.pyaml
qmk
smile
sops
spotify
ssh-to-pgp
tree
unigine-heaven
vesktop
via
virt-manager
vmware-horizon-client
vorta

View File

@@ -7,7 +7,7 @@
./apps/paperless
../../modules
# ./apps/nextcloud
./apps/nextcloud
];
nas-apps = {
@@ -17,7 +17,7 @@
environmentFiles = [ config.sops.secrets."jallen-nas/collabora".path ];
};
deluge.enable = true;
deluge.enable = false;
free-games-claimer.enable = true;
@@ -35,8 +35,14 @@
mongodb.enable = true;
nextcloud = {
netbootxyz = {
enable = true;
port = "4000";
port2 = "4080";
};
nextcloud = {
enable = false;
httpPort = "9981";
httpsPort = "9943";
};

View File

@@ -60,6 +60,19 @@ in
configFile = "${sabnzbdConfig}/sabnzbd.ini";
};
services.deluge = {
enable = true;
user = "arrs";
group = "media";
openFirewall = true;
dataDir = "/media";
web = {
enable = true;
port = 8112;
openFirewall = true;
};
};
# Create required users and groups
users.users.arrs = {
isSystemUser = true;
@@ -75,10 +88,11 @@ in
# System packages
environment.systemPackages = with pkgs; [
glib
sqlite
mono
mediainfo
protonvpn-cli
protonvpn-cli_2
];
# Create and set permissions for required directories
@@ -150,6 +164,10 @@ in
hostPath = "/media/nas/main/tv";
isReadOnly = false;
};
"/media/isos" = {
hostPath = "/media/nas/main/isos";
isReadOnly = false;
};
};
};
@@ -167,6 +185,10 @@ in
destination = "10.0.1.51:8080";
sourcePort = sabnzbdPort;
}
{
destination = "10.0.1.51:8112";
sourcePort = 8112;
}
];
};
}

View File

@@ -25,30 +25,49 @@ in
isReadOnly = false;
mountPoint = "/data";
};
"/var/lib/nextcloud" = {
hostPath = "/media/nas/ssd/nix-app-data/nextcloud";
isReadOnly = false;
mountPoint = "/var/lib/nextcloud";
};
"/var/lib/onlyoffice" = {
hostPath = "/media/nas/ssd/nix-app-data/onlyoffice";
isReadOnly = false;
mountPoint = "/var/lib/onlyoffice";
};
};
config =
{ pkgs, lib, ... }:
{
nixpkgs.config.allowUnfree = true;
services = {
nextcloud = {
enable = true;
package = pkgs.nextcloud30;
# datadir = "/data";
hostName = "localhost";
database.createLocally = true;
hostName = "cloud.mjallen.dev";
appstoreEnable = true;
caching.redis = true;
configureRedis = true;
enableImagemagick = true;
https = true;
config = {
adminuser = "mjallen";
adminpassFile = adminpass;
dbhost = "10.0.1.18:3306";
dbtype = "mysql";
dbname = "jallen_nextcloud";
dbhost = "localhost";
dbtype = "sqlite";
dbname = "nextcloud";
dbuser = "nextcloud";
dbpassFile = dbpass;
};
settings = {
allow_local_remote_servers = true;
upgrade.disable-web = false;
datadirectory = "/data";
trusted_domains = [
"10.0.1.18:9988"
@@ -85,12 +104,27 @@ in
"OC\\\\Preview\\\\HEIC"
];
installed = true;
# config_is_read_only = true;
user_oidc = {
auto_provision = false;
soft_auto_provision = false;
};
};
};
onlyoffice = {
enable = true;
port = 8000;
hostname = "office.mjallen.dev";
};
};
# System packages
environment.systemPackages = with pkgs; [
nextcloud30
onlyoffice-documentserver
sqlite
];
# Create required users and groups
users.users.nextcloud = {
isSystemUser = true;
@@ -98,18 +132,26 @@ in
group = "nextcloud";
};
users.users.onlyoffice = {
group = lib.mkForce "nextcloud";
};
users.groups = {
nextcloud = { gid = lib.mkForce nextcloudGroupId; };
downloads = {};
};
# Create and set permissions for required directories
system.activationScripts.radarr-dirs = ''
system.activationScripts.nextcloud-dirs = ''
mkdir -p /data
chown -R nextcloud:nextcloud /data
chown -R nextcloud:nextcloud /run/secrets/jallen-nas/nextcloud
chmod -R 775 /data
chmod -R 750 /run/secrets/jallen-nas/nextcloud
'';
@@ -138,6 +180,10 @@ in
destination = "10.0.2.18:80";
sourcePort = 9988;
}
{
destination = "10.0.2.18:8000";
sourcePort = 8000;
}
];
};
}

View File

@@ -0,0 +1,23 @@
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.netbootxyz;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.${cfg.name} = {
autoStart = true;
image = cfg.image;
volumes = [ "${cfg.configPath}:/config" "${cfg.assetsPath}:/assets" ];
ports = [ "${cfg.port}:3000" "69:69" "${cfg.port2}:80" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
};
};
};
}

View File

@@ -0,0 +1,58 @@
{ lib, ... }:
with lib;
{
options.nas-apps.netbootxyz = {
enable = mkEnableOption "netbootxyz docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "3000";
};
port2 = mkOption {
type = types.str;
default = "8080";
};
name = mkOption {
type = types.str;
default = "netbootxyz";
};
image = mkOption {
type = types.str;
default = "ghcr.io/netbootxyz/netbootxyz";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/nix-app-data/netbootxyz";
};
assetsPath = mkOption {
type = types.str;
default = "/media/nas/main/isos";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
}

View File

@@ -10,6 +10,7 @@
./apps/manyfold
./apps/mariadb
./apps/mongodb
./apps/netbootxyz
./apps/nextcloud
./apps/ollama
./apps/open-webui