More individualizing. Pretty cool
This commit is contained in:
parent
384e510647
commit
572eca5ea5
28 changed files with 57 additions and 84 deletions
|
@ -2,15 +2,18 @@
|
|||
{
|
||||
imports = [
|
||||
./cfdyndns
|
||||
./fileserver
|
||||
./forgejo
|
||||
./icecast
|
||||
./jellyfin
|
||||
./mailserver
|
||||
./mastodon
|
||||
./matrix
|
||||
./minecraft
|
||||
./mysql
|
||||
./nextcloud
|
||||
./nfs
|
||||
./nginx
|
||||
./owncast
|
||||
./socialserver
|
||||
./transmission
|
||||
./vaultwarden
|
||||
./wireguard
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.services.fileserver.enable = lib.mkEnableOption "Enable file serving services";
|
||||
|
||||
imports = [
|
||||
./jellyfin
|
||||
./nextcloud
|
||||
./nfs
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
./user
|
||||
];
|
||||
|
||||
config = lib.mkIf config.services.fileserver.enable {
|
||||
services.jellyfin.enable = true;
|
||||
environment.persistence."/persist".directories = [ "/var/lib/jellyfin" ];
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./user ];
|
||||
|
||||
config = lib.mkIf config.services.fileserver.enable {
|
||||
services.nfs.server = {
|
||||
enable = true;
|
||||
exports = "/storage *(rw,sync,no_subtree_check)";
|
||||
};
|
||||
networking.firewall.extraInputRules = "ip saddr 10.0.0.0/8 tcp dport 2049 accept";
|
||||
};
|
||||
}
|
9
modules/system/services/server/jellyfin/default.nix
Normal file
9
modules/system/services/server/jellyfin/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
./user
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = lib.mkIf config.services.jellyfin.enable [ "/var/lib/jellyfin" ];
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf config.services.socialserver.enable {
|
||||
config = lib.mkIf config.services.mastodon.enable {
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
localDomain = "social.nixfox.ca";
|
||||
streamingProcesses = 4;
|
||||
configureNginx = true;
|
19
modules/system/services/server/matrix/element/default.nix
Normal file
19
modules/system/services/server/matrix/element/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
nixpkgs.config.element-web.conf = lib.mkIf config.services.matrix-synapse.enable {
|
||||
default_server_config."m.homeserver" = {
|
||||
base_url = "https://matrix.nixfox.ca";
|
||||
server_name = "matrix.nixfox.ca";
|
||||
};
|
||||
branding = {
|
||||
auth_header_logo_url = "https://www.nixfox.ca/images/copyright/profile.png";
|
||||
#welcome_background_url = "https://www.nixfox.ca/images/backgrounds/template-background.png";
|
||||
};
|
||||
embedded_pages.home_url = "https://www.nixfox.ca/";
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
default_theme = "dark";
|
||||
};
|
||||
}
|
|
@ -2,9 +2,8 @@
|
|||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.services.socialserver.enable {
|
||||
config = lib.mkIf config.services.matrix-synapse.enable {
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server_name = "nixfox.ca";
|
||||
public_baseurl = "https://matrix.nixfox.ca";
|
|
@ -5,9 +5,8 @@
|
|||
./user
|
||||
];
|
||||
|
||||
config = lib.mkIf config.services.fileserver.enable {
|
||||
config = lib.mkIf config.services.nextcloud.enable {
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud30;
|
||||
hostName = "files.nixfox.ca";
|
||||
https = true;
|
9
modules/system/services/server/nfs/default.nix
Normal file
9
modules/system/services/server/nfs/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./user ];
|
||||
|
||||
config = lib.mkIf config.services.nfs.server.enable {
|
||||
services.nfs.server.exports = "/storage *(rw,sync,no_subtree_check)";
|
||||
networking.firewall.extraInputRules = "ip saddr 10.0.0.0/8 tcp dport 2049 accept";
|
||||
};
|
||||
}
|
|
@ -22,7 +22,5 @@
|
|||
80
|
||||
443
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = [ "/var/www" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
{
|
||||
config = lib.mkIf config.services.webserver.enable {
|
||||
services.nginx = {
|
||||
package = (pkgs.nginx.override {
|
||||
package = pkgs.nginx.override {
|
||||
modules = with pkgs.nginxModules; [ rtmp ];
|
||||
});
|
||||
};
|
||||
appendConfig = ''
|
||||
rtmp {
|
||||
server {
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{ ... }:
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./files
|
||||
./nixfox
|
||||
];
|
||||
|
||||
environment.persistence."/persist".directories = lib.mkIf config.services.webserver.enable [ "/var/www" ];
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./mastodon
|
||||
./matrix
|
||||
];
|
||||
|
||||
options.services.socialserver.enable = lib.mkEnableOption "Enable social media like services";
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
imports = [ ./nginx ];
|
||||
|
||||
config = lib.mkIf config.services.matrix-synapse.enable {
|
||||
nixpkgs.config.element-web.conf = {
|
||||
default_server_config."m.homeserver" = {
|
||||
base_url = "https://matrix.nixfox.ca";
|
||||
server_name = "matrix.nixfox.ca";
|
||||
};
|
||||
branding = {
|
||||
auth_header_logo_url = "https://www.nixfox.ca/images/copyright/profile.png";
|
||||
#welcome_background_url = "https://www.nixfox.ca/images/backgrounds/template-background.png";
|
||||
};
|
||||
embedded_pages.home_url = "https://www.nixfox.ca/";
|
||||
disable_custom_urls = true;
|
||||
disable_guests = true;
|
||||
default_theme = "dark";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,9 +8,9 @@
|
|||
sysusers.main = "bun";
|
||||
|
||||
users.users."${config.sysusers.main}" = {
|
||||
hashedPassword = config.secrets.mainAccPass;
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
hashedPassword = config.secrets.mainAccPass;
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../../../../hosts/tower/id_ed25519.pub
|
||||
../../../../hosts/kitty/id_ed25519.pub
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue