move some apps to namespace

This commit is contained in:
mjallen18
2025-08-21 19:06:51 -05:00
parent bd64283f04
commit 0e066cb4d7
25 changed files with 149 additions and 135 deletions

View File

@@ -2,11 +2,12 @@
config,
pkgs,
lib,
namespace,
...
}:
with lib;
let
cfg = config.nas-apps.actual;
cfg = config.${namespace}.services.actual;
dataDir = "/data";
hostAddress = "10.0.1.3";
actualUserId = config.users.users.nix-apps.uid;

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.actual = {
options.${namespace}.services.actual = {
enable = mkEnableOption "actual service";
port = mkOption {

View File

@@ -1,7 +1,7 @@
{ lib, config, ... }:
{ lib, config, namespace, ... }:
with lib;
let
cfg = config.nas-apps.free-games-claimer;
cfg = config.${namespace}.services.free-games-claimer;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.free-games-claimer = {
options.${namespace}.services.free-games-claimer = {
enable = mkEnableOption "free-games-claimer docker service";
autoStart = mkOption {

View File

@@ -1,7 +1,7 @@
{ lib, config, ... }:
{ lib, config, namespace, ... }:
with lib;
let
cfg = config.nas-apps.manyfold;
cfg = config.${namespace}.services.manyfold;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.manyfold = {
options.${namespace}.services.manyfold = {
enable = mkEnableOption "manyfold docker service";
autoStart = mkOption {

View File

@@ -1,7 +1,7 @@
{ lib, config, ... }:
{ lib, config, namespace, ... }:
with lib;
let
cfg = config.nas-apps.mongodb;
cfg = config.${namespace}.services.mongodb;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.mongodb = {
options.${namespace}.services.mongodb = {
enable = mkEnableOption "mongodb docker service";
autoStart = mkOption {

View File

@@ -1,7 +1,7 @@
{ lib, config, ... }:
{ lib, config, namespace, ... }:
with lib;
let
cfg = config.nas-apps.tdarr;
cfg = config.${namespace}.services.tdarr;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.tdarr = {
options.${namespace}.services.tdarr = {
enable = mkEnableOption "tdarr docker service";
autoStart = mkOption {

View File

@@ -1,7 +1,7 @@
{ lib, config, ... }:
{ lib, config, namespace, ... }:
with lib;
let
cfg = config.nas-apps.your_spotify;
cfg = config.${namespace}.services.your_spotify;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.your_spotify = {
options.${namespace}.services.your_spotify = {
enable = mkEnableOption "your_spotify docker service";
autoStart = mkOption {

View File

@@ -2,11 +2,12 @@
config,
pkgs,
lib,
namespace,
...
}:
with lib;
let
cfg = config.nas-apps.arrs;
cfg = config.${namespace}.services.arrs;
radarrDataDir = "/var/lib/radarr";
downloadDir = "/downloads";
incompleteDir = "/downloads-incomplete";

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.arrs = {
options.${namespace}.services.arrs = {
enable = mkEnableOption "arrs services";
radarr = {

View File

@@ -2,11 +2,12 @@
config,
lib,
pkgs,
namespace,
...
}:
with lib;
let
cfg = config.nas-apps.crowdsec;
cfg = config.${namespace}.services.crowdsec;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.crowdsec = {
options.${namespace}.services.crowdsec = {
enable = mkEnableOption "crowdsec service";
port = mkOption {

View File

@@ -79,7 +79,7 @@ in
main = {
device = rootDisk;
type = "disk";
imageSize = "15G";
imageSize = "32G";
content = {
type = "gpt";
partitions = {
@@ -108,23 +108,26 @@ in
"--compression=zstd"
];
subvolumes = {
"/root" = {
"subvolumes/root" = {
mountpoint = "/";
mountOptions = [
"verbose"
];
};
"/persistent" = {
"subvolumes/persistent" = {
mountpoint = "/persistent";
};
"/nix" = {
"subvolumes/nix" = {
mountOptions = [
"noatime"
];
mountpoint = "/nix";
};
};
mountpoint = "/partition-root";
};
};
} (lib.mkIf (cfg.filesystem == "btrfs") {
}
(lib.mkIf (cfg.filesystem == "btrfs") {
nodev."/" = {
fsType = "tmpfs";
mountOptions = [
@@ -133,6 +136,7 @@ in
"size=25%"
];
};
})];
})
];
};
}

View File

@@ -1,7 +1,7 @@
{ config, lib, ... }:
{ config, lib, namespace, ... }:
with lib;
let
cfg = config.nas-apps.gitea;
cfg = config.${namespace}.services.gitea;
hostAddress = "10.0.1.3";
# localAddress = "10.0.4.18";
# httpPort = 3000;

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.gitea = {
options.${namespace}.services.gitea = {
enable = mkEnableOption "gitea service";
httpPort = mkOption {

View File

@@ -2,11 +2,12 @@
{
config,
lib,
namespace,
...
}:
with lib;
let
cfg = config.mjallen.impermanence;
cfg = config.${namespace}.impermanence;
in
{
imports = [ ./options.nix ];
@@ -107,14 +108,14 @@ in
config.fileSystems."/".fsType == "btrfs" || config.fileSystems."/".fsType == "bcachefs" || config.fileSystems."/".fsType == "tmpfs"
else
false;
message = "rootfs must be btrfs, bcachefs, or tmpfs";
message = "rootfs must be btrfs, bcachefs, or tmpfs; not " + config.fileSystems."/".fsType;
}
{
assertion =
if hasAttr "/" config.fileSystems && (config.fileSystems."/".fsType == "btrfs" || config.fileSystems."/".fsType == "bcachefs") then
any (
t: t == "subvol=root" || t == "subvol=/root" || t == "X-mount.subdir=root"
t: t == "subvol=root" || t == "subvol=/root" || t == "X-mount.subdir=subvolumes/root"
) config.fileSystems."/".options
else
true;

View File

@@ -1,11 +1,12 @@
{
lib,
config,
namespace,
...
}:
with lib;
let
cfg = config.nas-apps.orca-slicer;
cfg = config.${namespace}.services.orca-slicer;
in
{
imports = [ ./options.nix ];

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{ lib, namespace, ... }:
with lib;
{
options.nas-apps.orca-slicer = {
options.${namespace}.services.orca-slicer = {
enable = mkEnableOption "orca slicer docker service";
autoStart = mkOption {