Migrate Mastodon to NixOS
This commit is contained in:
parent
7055927848
commit
c347478e96
11 changed files with 256 additions and 78 deletions
43
config/hosts/mastodon/configuration.nix
Normal file
43
config/hosts/mastodon/configuration.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "mastodon";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 8443 ];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/mnt/data" = {
|
||||
device = "/dev/disk/by-label/data";
|
||||
fsType = "ext4";
|
||||
autoResize = true;
|
||||
};
|
||||
"/var/lib/mastodon/public-system" = {
|
||||
depends = [ "/mnt/data" ];
|
||||
device = "/mnt/data/mastodon";
|
||||
fsType = "none";
|
||||
options = [ "bind" "X-mount.owner=mastodon" "X-mount.group=mastodon" ];
|
||||
};
|
||||
"/var/lib/postgresql" = {
|
||||
depends = [ "/mnt/data" ];
|
||||
device = "/mnt/data/postgresql";
|
||||
fsType = "none";
|
||||
options = [ "bind" "X-mount.owner=postgres" "X-mount.group=postgres" ];
|
||||
};
|
||||
"/var/lib/private/opensearch/data" = {
|
||||
depends = [ "/mnt/data" ];
|
||||
device = "/mnt/data/opensearch";
|
||||
fsType = "none";
|
||||
options = [ "bind" "X-mount.owner=opensearch" "X-mount.group=opensearch" ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue