Lots of user changes and also Spacebar
This commit is contained in:
parent
b5ec4cbf68
commit
36c3f778c8
19 changed files with 69 additions and 43 deletions
|
@ -3,7 +3,7 @@
|
|||
imports = [
|
||||
./mastodon
|
||||
./owncast
|
||||
#./spacebar
|
||||
./spacebar
|
||||
];
|
||||
|
||||
options.system.socialserver.enable = lib.mkEnableOption "Enable social media like services";
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, spacebar, ... }:
|
||||
{
|
||||
imports = [
|
||||
#./nginx
|
||||
./user
|
||||
];
|
||||
|
||||
config = lib.mkIf config.system.socialserver.enable {
|
||||
systemd.services.spacebar-server = {
|
||||
enable = true;
|
||||
description = "Spacebar Chat Server";
|
||||
documentation = [ "https://docs.spacebar.chat/" ];
|
||||
path = [ spacebar.packages.${pkgs.system}.default ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
WorkingDirectory = "/var/lib/spacebar";
|
||||
ExecStart = "start-bundle";
|
||||
Restart = "always";
|
||||
User = "spacebar";
|
||||
};
|
||||
};
|
||||
environment.persistence."/persist".directories = [ config.systemd.services.spacebar-server.serviceConfig.WorkingDirectory ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
users = lib.mkIf config.system.socialserver.enable {
|
||||
users.spacebar = {
|
||||
group = "spacebar";
|
||||
isSystemUser = true;
|
||||
uid = 138;
|
||||
};
|
||||
groups.spacebar = {};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue