fix manyfold

This commit is contained in:
mjallen18
2024-09-20 19:17:19 -05:00
parent 1f4010eb89
commit 6553d2b574
13 changed files with 264 additions and 78 deletions

106
flake.lock generated
View File

@@ -51,11 +51,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1726137353, "lastModified": 1726576520,
"narHash": "sha256-XkKlVYMDWGQ39N6208YsQdw39ZYuqCFKQtwXcWL67rQ=", "narHash": "sha256-qkaiUpE3qRXunKbUzMaTGTMzF8nv534oglJY4a2hxNY=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "446bfd7a2e79143abca6aa8a87c348fbdca29ffe", "rev": "4409a04839fc8c911ef3e461bb5f422ae1d03a85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -76,11 +76,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1726067613, "lastModified": 1726623342,
"narHash": "sha256-45Zyi5EsOqeAWN1cm7S2l2V3OYX90secI5+MqXGNTnU=", "narHash": "sha256-LdXem2W/QJD5MKnhH/BO63kKSVgiu5y6181NVPshtec=",
"owner": "lilyinstarlight", "owner": "lilyinstarlight",
"repo": "nixos-cosmic", "repo": "nixos-cosmic",
"rev": "d80add9719ebb66471d536150233198cbadcb2dd", "rev": "5137d4608a7225cc90a31aad8d5c37234cb18dca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -119,11 +119,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1726036322, "lastModified": 1726468443,
"narHash": "sha256-9Hwl4lzB5yFah00OaXSMDPDubCy99wtLgsYxMVpMwlM=", "narHash": "sha256-O1VcbVBrqIf58U05yFXl9+J7XM2qh0I+7vqMbNwZPq0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "3e50a3c915882f07cb3f6c246f09febc4ad36c3e", "rev": "effac20e9560aab202e82b6d833f685163a9c138",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -397,11 +397,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726036828, "lastModified": 1726440980,
"narHash": "sha256-ZQHbpyti0jcAKnwQY1lwmooecLmSG6wX1JakQ/eZNeM=", "narHash": "sha256-ChhIrjtdu5d83W+YDRH+Ec5g1MmM0xk6hJnkz15Ot7M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8a1671642826633586d12ac3158e463c7a50a112", "rev": "a9c9cc6e50f7cbd2d58ccb1cd46a1e06e9e445ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -417,11 +417,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726142087, "lastModified": 1726611255,
"narHash": "sha256-uT4TRd3PgreUD5sJaNioVfMemdyWFLoPHqN4AFszGmw=", "narHash": "sha256-/bxaYvIK6/d3zqpW26QFS0rqfd0cO4qreSNWvYLTl/w=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "da8406a6ff556b86dc368e96ca8bd81b2704a91a", "rev": "d2493de5cd1da06b6a4c3e97f4e7d5dd791df457",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -454,11 +454,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726031155, "lastModified": 1726115155,
"narHash": "sha256-QUv5cxy40HRC7vJz9JjbVEmlHT+q1VIuikNJUQZHre0=", "narHash": "sha256-VDylz5VX4JD4/TZv6xUJDwuvNdgLRGoOpue1dlZGdIQ=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "90c68db7d9430bd30e8c5096a0e3dc078b410050", "rev": "02cf60ce20b6034fc0459e5116cec7016aaff6e4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -525,11 +525,11 @@
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1726146727, "lastModified": 1726616680,
"narHash": "sha256-/FDZ7N0ttDxmu2Orzz+RuVGkVceagh/eKMzdgo3g+hQ=", "narHash": "sha256-i0h300W3t7Q7PltJPmucj+ub45SE/bNQ+pf83tasYAQ=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "9d7aebb3039fbfb93afebef53210e2999f8b7e1a", "rev": "6374cd7e50aa057a688142eed2345083047ad884",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -593,15 +593,15 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1725635983, "lastModified": 1726468554,
"narHash": "sha256-haSfwdurfltqQ/7YEmDcmWLnWwvAgelIHnXsHG34P1k=", "narHash": "sha256-Vyumyd9Qqh6n0hdfqOftDVbPuMJ5H+7Pp3w5/FDZ6gQ=",
"owner": "lilyinstarlight", "owner": "Mic92",
"repo": "nix-update", "repo": "nix-update",
"rev": "ed54a7546affb3f8c9c3e10a6fa6fdb21756ec8f", "rev": "b28bb46366ee32440cc525d18b71bac98a6925a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "lilyinstarlight", "owner": "Mic92",
"repo": "nix-update", "repo": "nix-update",
"type": "github" "type": "github"
} }
@@ -628,11 +628,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1725885300, "lastModified": 1726650330,
"narHash": "sha256-5RLEnou1/GJQl+Wd+Bxaj7QY7FFQ9wjnFq1VNEaxTmc=", "narHash": "sha256-UbHzmaOQ18O/kCizipU70N0UQVFIfv8AiFKXw07oZ9Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "166dee4f88a7e3ba1b7a243edb1aca822f00680e", "rev": "abb448608a56a60075468e90d8acec2a7cb689b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -672,11 +672,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1725930920, "lastModified": 1726447378,
"narHash": "sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM=", "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "44a71ff39c182edaf25a7ace5c9454e7cba2c658", "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -720,11 +720,11 @@
}, },
"nixpkgs-stable_4": { "nixpkgs-stable_4": {
"locked": { "locked": {
"lastModified": 1725930920, "lastModified": 1726447378,
"narHash": "sha256-RVhD9hnlTT2nJzPHlAqrWqCkA7T6CYrP41IoVRkciZM=", "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "44a71ff39c182edaf25a7ace5c9454e7cba2c658", "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -752,11 +752,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1725983898, "lastModified": 1726463316,
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -768,11 +768,11 @@
}, },
"nixpkgs-unstable-small": { "nixpkgs-unstable-small": {
"locked": { "locked": {
"lastModified": 1726123687, "lastModified": 1726658796,
"narHash": "sha256-fwpPGjVR5VM/uOifYkr9t5hZE2xGmFlp8RrKqedyizg=", "narHash": "sha256-SiiWCVg/W8i6jvpgQj3NNd3YtV+jfnn/t3Za7hfn1iE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e5330a9a58dfae92df814013e90509dbae747ce9", "rev": "75ac2a58e988a346960938ab16cea903a3cb053a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -784,11 +784,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1725983898, "lastModified": 1726463316,
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=", "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43", "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -939,11 +939,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1725985110, "lastModified": 1726443025,
"narHash": "sha256-0HKj+JI6rtxaE6Kzcd6HyFNbEFJRsLy5DoNgVF1pyRM=", "narHash": "sha256-nCmG4NJpwI0IoIlYlwtDwVA49yuspA2E6OhfCOmiArQ=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "bcc708992104c2059f310fbc3ac00bfc377f9ea8", "rev": "94b526fc86eaa0e90fb4d54a5ba6313aa1e9b269",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -961,11 +961,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726021481, "lastModified": 1726539203,
"narHash": "sha256-4J4E+Fh+77XIYnq2RVtg+ENWXpu6t74P0jKN/f2RQmI=", "narHash": "sha256-u1tAteb4qkH2gGjDY3mN/4Qxa6y798t4G0jNKDyTwv8=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "1c2c120246c51a644c20ba2a36a33d3bd4860d70", "rev": "20c8461785d8f5af32d8d4d5c128589e23d7f033",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1021,11 +1021,11 @@
"nixpkgs-stable": "nixpkgs-stable_5" "nixpkgs-stable": "nixpkgs-stable_5"
}, },
"locked": { "locked": {
"lastModified": 1725922448, "lastModified": 1726524647,
"narHash": "sha256-ruvh8tlEflRPifs5tlpa0gkttzq4UtgXkJQS7FusgFE=", "narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "cede1a08039178ac12957733e97ab1006c6b6892", "rev": "e2d404a7ea599a013189aa42947f66cede0645c8",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -10,6 +10,13 @@ in
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = lib.mkForce false; enable = lib.mkForce false;
extraEntries = {
"Windows.conf" = ''
title Windows 11
efi /shellx64.efi
options -nointerrupt -nomap -noversion b18bfb02-872a-4a24-ada1-afe1e51474f4:EFI\Microsoft\Boot\bootmgfw.efi
'';
};
}; };
efi = { efi = {
@@ -40,4 +47,8 @@ in
consoleLogLevel = 3; consoleLogLevel = 3;
bootspec.enable = true; bootspec.enable = true;
}; };
environment.systemPackages = with pkgs; [
edk2-uefi-shell
];
} }

View File

@@ -92,7 +92,7 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/a94819f6-d4e1-4471-b972-703c80de1a5f"; } ]; swapDevices = [ { device = "/dev/disk/by-uuid/c0b407c5-aaa6-4ff2-89e2-39ebee6bf235"; } ];
fileSystems."/home/matt/Games" = { fileSystems."/home/matt/Games" = {
device = "/dev/disk/by-uuid/1adb3161-ef9e-45d9-be5f-dd718186f1b3"; device = "/dev/disk/by-uuid/1adb3161-ef9e-45d9-be5f-dd718186f1b3";

View File

@@ -43,6 +43,8 @@
allowSignup = "false"; allowSignup = "false";
}; };
mongodb.enable = true;
nextcloud = { nextcloud = {
enable = true; enable = true;
httpPort = "9981"; httpPort = "9981";
@@ -73,5 +75,7 @@
wireguard.enable = true; wireguard.enable = true;
wireguard.configPath = "/media/nas/ssd/nix-app-data/wireguard/sidestore"; wireguard.configPath = "/media/nas/ssd/nix-app-data/wireguard/sidestore";
your_spotify.enable = true;
}; };
} }

View File

@@ -56,10 +56,10 @@ in
wireless = { wireless = {
enable = true; enable = true;
environmentFile = config.sops.secrets."wifi".path; secretsFile = config.sops.secrets."wifi".path;
networks = { networks = {
"Joey's Jungle 5G" = { "Joey's Jungle 5G" = {
psk = "@PSK@"; pskRaw = "ext:PSK";
}; };
}; };
}; };

View File

@@ -27,9 +27,6 @@ in
PUID = cfg.puid; PUID = cfg.puid;
PGID = cfg.pgid; PGID = cfg.pgid;
TZ = cfg.timeZone; TZ = cfg.timeZone;
# For postgres or mariadb use <scheme>://<username>:<password>@<hostname>:<port>/<db name> where <scheme> is postgresql or mysql2
DATABASE_URL = "sqlite3:/config/manyfold.sqlite3";
# REDIS_URL = "redis://10.0.1.18:6380/0"; # redis://<hostname>:<port>/<db number>
}; };
environmentFiles = [ config.sops.secrets."jallen-nas/manyfold/secretkeybase".path ]; environmentFiles = [ config.sops.secrets."jallen-nas/manyfold/secretkeybase".path ];
}; };

View File

@@ -21,7 +21,7 @@ with lib;
image = mkOption { image = mkOption {
type = types.str; type = types.str;
default = "ghcr.io/manyfold3d/manyfold"; default = "ghcr.io/manyfold3d/manyfold-solo";
}; };
configPath = mkOption { configPath = mkOption {

View File

@@ -0,0 +1,25 @@
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.mongodb;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
ports = [ "${cfg.port}:27017" ];
volumes = [ "${cfg.configPath}:/data/db mongodb/" ];
# environmentFiles = cfg.environmentFiles;
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
# MONGO_INITDB_ROOT_USERNAME = "";#cfg.databaseUser;
# MONGO_INITDB_ROOT_PASSWORD = "";#cfg.databasePassword; # get from env file
};
};
};
}

View File

@@ -0,0 +1,52 @@
{ lib, ... }:
with lib;
{
options.nas-apps.mongodb = {
enable = mkEnableOption "mongodb docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
port = mkOption {
type = types.str;
default = "27017";
};
name = mkOption {
type = types.str;
default = "mongodb";
};
image = mkOption {
type = types.str;
default = "mongodb/mongodb-community-server";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/mongodb";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
environmentFiles = mkOption {
type = with types; listOf path;
default = [ ];
};
};
}

View File

@@ -0,0 +1,39 @@
{ lib, config, ... }:
with lib;
let
cfg = config.nas-apps.your_spotify;
in
{
imports = [ ./options.nix ];
config = mkIf cfg.enable {
virtualisation.oci-containers.containers."${cfg.name}-server" = {
autoStart = true;
image = cfg.imageServer;
volumes = [ "${cfg.configPath}:/root/.your-spotify" ];
ports = [ "${cfg.portServer}:8080" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
API_ENDPOINT = "http://10.0.1.18:${cfg.portServer}";
CLIENT_ENDPOINT = "http://10.0.1.18:${cfg.portWeb}";
SPOTIFY_PUBLIC = "e270589d72a6494680a17d325af8670d";
SPOTIFY_SECRET = "423cb7b69fe8486e89eccd01e0c22924";
};
};
virtualisation.oci-containers.containers."${cfg.name}-web" = {
autoStart = true;
image = cfg.imageWeb;
ports = [ "${cfg.portWeb}:3000" ];
environment = {
PUID = cfg.puid;
PGID = cfg.pgid;
TZ = cfg.timeZone;
API_ENDPOINT = "http://10.0.1.18:${cfg.portServer}";
};
};
};
}

View File

@@ -0,0 +1,57 @@
{ lib, ... }:
with lib;
{
options.nas-apps.your_spotify = {
enable = mkEnableOption "your_spotify docker service";
autoStart = mkOption {
type = types.bool;
default = true;
};
portServer = mkOption {
type = types.str;
default = "7777";
};
portWeb = mkOption {
type = types.str;
default = "7778";
};
name = mkOption {
type = types.str;
default = "your_spotify";
};
imageServer = mkOption {
type = types.str;
default = "yooooomi/your_spotify_server";
};
imageWeb = mkOption {
type = types.str;
default = "yooooomi/your_spotify_client";
};
configPath = mkOption {
type = types.str;
default = "/media/nas/ssd/nix-app-data/your_spotify";
};
puid = mkOption {
type = types.str;
default = "911";
};
pgid = mkOption {
type = types.str;
default = "1000";
};
timeZone = mkOption {
type = types.str;
default = "America/Chicago";
};
};
}

View File

@@ -14,6 +14,7 @@
./apps/manyfold ./apps/manyfold
./apps/mariadb ./apps/mariadb
./apps/mealie ./apps/mealie
./apps/mongodb
./apps/nextcloud ./apps/nextcloud
./apps/ollama ./apps/ollama
./apps/open-webui ./apps/open-webui
@@ -25,5 +26,6 @@
./apps/tdarr ./apps/tdarr
./apps/vscode ./apps/vscode
./apps/wireguard ./apps/wireguard
./apps/your-spotify
]; ];
} }

View File

@@ -29,25 +29,24 @@ in
services.samba = { services.samba = {
enable = true; enable = true;
securityType = "user";
openFirewall = true; openFirewall = true;
extraConfig = '' # settings = {
create mode = 664 # create-mode = 664;
force directory mode = 2770 # force directory mode = 2770
workgroup = WORKGROUP # workgroup = WORKGROUP
server string = jallen-nas # server string = jallen-nas
netbios name = jallen-nas # netbios name = jallen-nas
security = user # security = user
#use sendfile = yes # #use sendfile = yes
#max protocol = smb2 # #max protocol = smb2
# note: localhost is the ipv6 localhost ::1 # # note: localhost is the ipv6 localhost ::1
hosts allow = ${cfg.hostsAllow} 127.0.0.1 localhost # hosts allow = ${cfg.hostsAllow} 127.0.0.1 localhost
hosts deny = 0.0.0.0/0 # hosts deny = 0.0.0.0/0
guest account = nobody # guest account = nobody
map to guest = bad user # map to guest = bad user
usershare allow guests = yes # usershare allow guests = yes
''; # };
shares = settings =
let let
make = make =
name: share: name: share: