Compare commits

...

6 commits

Author SHA1 Message Date
glenn 2cc3da022c configure reverse proxy for ai 2024-07-25 10:20:17 +02:00
glenn a68decebc6 enable adhoc install apps 2024-07-25 10:20:00 +02:00
glenn 38e2c1f9aa support ai stuff 2024-07-25 10:19:49 +02:00
glenn f111dbafe9 now local ai builds 2024-07-25 10:19:30 +02:00
glenn 654372b65f bump 2024-07-25 10:19:07 +02:00
glenn 434bb83ed4 remove sound.enable becouse it is no longer supported 2024-07-25 10:18:13 +02:00
5 changed files with 73 additions and 38 deletions

22
ai.nix Normal file
View file

@ -0,0 +1,22 @@
{
self,
config,
lib,
pkgs,
...
}: let
domain = "ai.sondell.org";
in {
services.nginx.virtualHosts = {
${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:9876/";
proxyWebsockets = true;
};
# Use DNS Challenege.
# acmeRoot = null;
};
};
}

View file

@ -84,7 +84,6 @@
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
@ -127,7 +126,7 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# local-ai does not build
local-ai #does not build
alejandra
restic
htop

View file

@ -78,11 +78,11 @@
]
},
"locked": {
"lastModified": 1720470846,
"narHash": "sha256-7ftA4Bv5KfH4QdTRxqe8/Hz2YTKo+7IQ9n7vbNWgv28=",
"lastModified": 1721804110,
"narHash": "sha256-i4jINRazBKPqlaS+qhlP+kV/UHEq3vs5itfpblqu4ZM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2fb5c1e0a17bc6059fa09dc411a43d75f35bb192",
"rev": "af70fc502a15d7e1e4c5a4c4fc8e06c2ec561e0c",
"type": "github"
},
"original": {
@ -101,11 +101,11 @@
"nixpkgs-24_05": "nixpkgs-24_05"
},
"locked": {
"lastModified": 1718697807,
"narHash": "sha256-Enla61WFisytTYbWygPynEbu8vozjeGc6Obkj2GRj7o=",
"lastModified": 1721121314,
"narHash": "sha256-zwc7YXga/1ppaZMWFreZykXtFwBgXodxUZiUx969r+g=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "290a995de5c3d3f08468fa548f0d55ab2efc7b6b",
"rev": "059b50b2e729729ea00c6831124d3837c494f3d5",
"type": "gitlab"
},
"original": {
@ -116,11 +116,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1720418205,
"narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=",
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "655a58a72a6601292512670343087c2d75d859c1",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github"
},
"original": {

View file

@ -13,10 +13,15 @@
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs";
};
};
};
outputs = { self, nixpkgs, home, nixos-mailserver, home-manager}@attrs:
let
outputs = {
self,
nixpkgs,
home,
nixos-mailserver,
home-manager,
} @ attrs: let
system = "x86_64-linux";
homepage = home.packages.${system}.default;
mailserver = nixos-mailserver.nixosModules.default;
@ -32,29 +37,31 @@
home-manager.nixosModules.home-manager
homeSettings
];
in
{
in {
# replace 'joes-desktop' with your hostname here.
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem
{
inherit system;
specialArgs = attrs;
modules = [
./configuration.nix
./audiobooks.nix
./tunnel.nix
./forgejo.nix
./nextcloud.nix
./jellyfin.nix
./filebrowser.nix
./tail.nix
./matrix.nix
./coturn.nix
./vaultwarden.nix
(import ./mail.nix {inherit mailserver;})
(import ./homepage.nix {inherit homepage;})
] ++ homeModules;
};
nixosConfigurations.nixos =
nixpkgs.lib.nixosSystem
{
inherit system;
specialArgs = attrs;
modules =
[
./configuration.nix
./audiobooks.nix
./tunnel.nix
./forgejo.nix
./nextcloud.nix
./jellyfin.nix
./filebrowser.nix
./tail.nix
./ai.nix
./matrix.nix
./coturn.nix
./vaultwarden.nix
(import ./mail.nix {inherit mailserver;})
(import ./homepage.nix {inherit homepage;})
]
++ homeModules;
};
};
}

View file

@ -7,6 +7,12 @@
}: let
domain = "cloud.sondell.org";
nextcloud = pkgs.nextcloud29;
app_api = pkgs.fetchNextcloudApp {
url = "https://github.com/cloud-py-api/app_api/releases/download/v2.7.0/app_api-v2.7.0.tar.gz";
sha256 = "sha256-l/ZbHbsITUFk/Ay3xpX60UwifG9aWZBQoz3fSEjVO30=";
license = "agpl3Only";
};
in {
environment.systemPackages = [
nextcloud
@ -67,6 +73,7 @@ in {
#
nextcloud = {
enable = true;
appstoreEnable = true;
hostName = domain;
# Need to manually increment with every major upgrade.
package = nextcloud;
@ -101,7 +108,7 @@ in {
extraApps = with config.services.nextcloud.package.packages.apps; {
# List of apps we want to install and are already packaged in
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json
inherit mail calendar contacts notes onlyoffice cookbook spreed memories previewgenerator integration_openai;
inherit mail calendar contacts notes onlyoffice cookbook spreed memories previewgenerator integration_openai app_api;
};
config = {
overwriteProtocol = "https";