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

View File

@@ -359,12 +359,18 @@ in
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
hardware.sane = { hardware = {
enable = true; keyboard = {
brscan5.enable = true; qmk.enable = true;
dsseries.enable = false; };
# backends-package = pkgs.brscan5;
extraBackends = [ pkgs.brscan5 ]; 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, # 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
python312Packages.pytest-cov python312Packages.pytest-cov
python312Packages.pyaml python312Packages.pyaml
qmk
smile smile
sops sops
spotify spotify
ssh-to-pgp ssh-to-pgp
tree tree
unigine-heaven
vesktop vesktop
via
virt-manager virt-manager
vmware-horizon-client vmware-horizon-client
vorta vorta

View File

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

View File

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

View File

@@ -25,30 +25,49 @@ in
isReadOnly = false; isReadOnly = false;
mountPoint = "/data"; 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 = config =
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
nixpkgs.config.allowUnfree = true;
services = { services = {
nextcloud = { nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud30; package = pkgs.nextcloud30;
# datadir = "/data"; # datadir = "/data";
hostName = "localhost"; database.createLocally = true;
hostName = "cloud.mjallen.dev";
appstoreEnable = true; appstoreEnable = true;
caching.redis = true; caching.redis = true;
configureRedis = true; configureRedis = true;
enableImagemagick = true;
https = true;
config = { config = {
adminuser = "mjallen"; adminuser = "mjallen";
adminpassFile = adminpass; adminpassFile = adminpass;
dbhost = "10.0.1.18:3306"; dbhost = "localhost";
dbtype = "mysql"; dbtype = "sqlite";
dbname = "jallen_nextcloud"; dbname = "nextcloud";
dbuser = "nextcloud"; dbuser = "nextcloud";
dbpassFile = dbpass;
}; };
settings = { settings = {
allow_local_remote_servers = true;
upgrade.disable-web = false;
datadirectory = "/data"; datadirectory = "/data";
trusted_domains = [ trusted_domains = [
"10.0.1.18:9988" "10.0.1.18:9988"
@@ -85,12 +104,27 @@ in
"OC\\\\Preview\\\\HEIC" "OC\\\\Preview\\\\HEIC"
]; ];
installed = true; 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 # Create required users and groups
users.users.nextcloud = { users.users.nextcloud = {
isSystemUser = true; isSystemUser = true;
@@ -98,18 +132,26 @@ in
group = "nextcloud"; group = "nextcloud";
}; };
users.users.onlyoffice = {
group = lib.mkForce "nextcloud";
};
users.groups = { users.groups = {
nextcloud = { gid = lib.mkForce nextcloudGroupId; }; nextcloud = { gid = lib.mkForce nextcloudGroupId; };
downloads = {}; downloads = {};
}; };
# Create and set permissions for required directories # Create and set permissions for required directories
system.activationScripts.radarr-dirs = '' system.activationScripts.nextcloud-dirs = ''
mkdir -p /data mkdir -p /data
chown -R nextcloud:nextcloud /data chown -R nextcloud:nextcloud /data
chown -R nextcloud:nextcloud /run/secrets/jallen-nas/nextcloud
chmod -R 775 /data chmod -R 775 /data
chmod -R 750 /run/secrets/jallen-nas/nextcloud
''; '';
@@ -138,6 +180,10 @@ in
destination = "10.0.2.18:80"; destination = "10.0.2.18:80";
sourcePort = 9988; 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/manyfold
./apps/mariadb ./apps/mariadb
./apps/mongodb ./apps/mongodb
./apps/netbootxyz
./apps/nextcloud ./apps/nextcloud
./apps/ollama ./apps/ollama
./apps/open-webui ./apps/open-webui