Move towards impermanence on Prophet

This commit is contained in:
Vice 2025-03-05 04:33:20 -05:00
parent eb34493b18
commit 9f26c7de39
4 changed files with 88 additions and 65 deletions

View file

@ -4,32 +4,42 @@
"/" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@" ];
options = [ "subvol=root" ];
};
"/home" = {
"/prev" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@home" ];
options = [ "subvol=prev" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@nix" ];
options = [ "subvol=nix" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/7C94-8C9A";
fsType = "vfat";
options = [ "umask=0077" ];
};
# To be removed
"/home" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/var" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@var" ];
};
"/.snapshots" = {
# Impermanence and subvols
"/persist" = {
device = "/dev/disk/by-uuid/e50e186d-e5bc-40b0-9cd7-43b609cde3ea";
fsType = "btrfs";
options = [ "subvol=@snapshots" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/7C94-8C9A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
neededForBoot = true;
options = [ "subvol=persist" ];
};
"/export/Bulk" = {
device = "/dev/disk/by-uuid/ef465845-cc56-4db5-9260-8ae515eb025e";

View file

@ -1,12 +1,16 @@
{ config, ... }:
{ config, lib, ... }:
{
services.roundcube = {
enable = config.system.mailserver.enable;
hostName = "mail.nixfox.ca";
extraConfig = ''
$config['smtp_server'] = "tls://mx.nixfox.ca";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
config = lib.mkIf config.system.mailserver.enable {
services.roundcube = {
enable = true;
hostName = "mail.nixfox.ca";
extraConfig = ''
$config['smtp_server'] = "tls://mx.nixfox.ca";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
};
environment.persistence."/persist".directories = [ "/var/lib/roundcube" ];
};
}

View file

@ -1,60 +1,69 @@
{ config, pkgs, mailserver, ... }:
{ config, lib, pkgs, mailserver, ... }:
{
imports = [
./nginx
mailserver.nixosModule
];
mailserver = rec {
enable = config.system.mailserver.enable;
domains = [
"nixfox.ca"
"bloxelcom.net"
"freecorn1854.win"
"lunamoonlight.xyz"
];
fqdn = "mx.nixfox.ca";
certificateScheme = "acme-nginx";
localDnsResolver = false;
redis.port = 1515;
config = lib.mkIf config.system.mailserver.enable {
mailserver = {
enable = true;
domains = [
"nixfox.ca"
"bloxelcom.net"
"freecorn1854.win"
"lunamoonlight.xyz"
];
fqdn = "mx.nixfox.ca";
certificateScheme = "acme-nginx";
localDnsResolver = false;
redis.port = 1515;
# Passwords made with 'mkpasswd -sm bcrypt'
loginAccounts = {
"noreply@nixfox.ca" = {
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
sendOnly = true;
};
# Passwords made with 'mkpasswd -sm bcrypt'
loginAccounts = {
"noreply@nixfox.ca" = {
hashedPasswordFile = pkgs.writeText "noreply" config.secrets.noreplyMailHash;
sendOnly = true;
};
"jimbo@nixfox.ca" = {
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
aliases = [
"james@nixfox.ca"
"jimbo@bloxelcom.net"
"jimbo@nixfox.ca" = {
hashedPasswordFile = pkgs.writeText "jimbo" config.secrets.jimboMailHash;
aliases = [
"james@nixfox.ca"
"jimbo@bloxelcom.net"
"vice@nixfox.ca"
"vice@bloxelcom.net"
"yara@nixfox.ca"
"vice@nixfox.ca"
"vice@bloxelcom.net"
"yara@nixfox.ca"
"contact@nixfox.ca"
];
};
"contact@nixfox.ca"
];
};
"luna@lunamoonlight.xyz" = {
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
aliases = [
"luna@bloxelcom.net"
"contact@bloxelcom.net"
"ibu@bloxelcom.net"
];
};
"luna@lunamoonlight.xyz" = {
hashedPasswordFile = pkgs.writeText "luna" config.secrets.lunaMailHash;
aliases = [
"luna@bloxelcom.net"
"contact@bloxelcom.net"
"ibu@bloxelcom.net"
];
};
"contact@freecorn1854.win" = {
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
aliases = [ "freecorn@bloxelcom.net" ];
"contact@freecorn1854.win" = {
hashedPasswordFile = pkgs.writeText "corn" config.secrets.cornMailHash;
aliases = [ "freecorn@bloxelcom.net" ];
};
};
};
};
# Rspamd port from earlier to avoid overlap
services.redis.servers.rspamd.port = 1515;
# Rspamd port from earlier to avoid overlap
services.redis.servers.rspamd.port = config.mailserver.redis.port;
environment.persistence."/persist".directories = [
"/var/vmail"
"/var/lib/dovecot"
"/var/lib/postfix"
"/var/lib/redis-rspamd"
];
};
}

View file

@ -1,4 +1,4 @@
{ minecraft, config, lib, ... }:
{ config, lib, minecraft, ... }:
{
imports = [
minecraft.nixosModules.minecraft-servers