move nfs and nc to tacotuesday

pull/1/head
Stef Dunlap 9 months ago
parent bb1ff0bb4b
commit cf74cde310
  1. 2
      box/tacotuesday.nix
  2. 59
      box/y500.nix
  3. 61
      conf/nextcloud_and_nfs.nix
  4. 1
      flake.nix

@ -35,7 +35,7 @@
networking = {
interfaces.wlo1.useDHCP = lib.mkDefault true;
interfaces.enp3s0.ipv4.addresses = [ {
address = "192.168.1.23";
address = "192.168.1.20";
prefixLength = 24;
} ];
defaultGateway = "192.168.1.1";

@ -47,63 +47,4 @@
services.logind.lidSwitchExternalPower = "ignore";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.postgresql = {
enable = true;
dataDir = "/mnt/Inky/postgresql/";
};
services.nextcloud = {
enable = true;
datadir = "/mnt/Inky/nc_data";
hostName = "nc.kindrobot.ca";
https = true;
config = {
dbtype = "pgsql";
dbpassFile = "/var/nextcloud-secrets/db_password.txt";
adminuser = "admin";
adminpassFile = "/var/nextcloud-secrets/admin_password.txt";
overwriteProtocol = "https";
};
};
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
};
# nfs setup
fileSystems."/mnt/Gabriel" = {
device = "/dev/disk/by-label/Gabriel";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Henry" = {
device = "/dev/disk/by-label/Henry";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Isabela" = {
device = "/dev/disk/by-label/Isabela";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Inky" = {
device = "/dev/disk/by-label/Inky";
fsType = "ext4";
options = ["nofail"];
};
fileSystems."/mnt/J" = {
device = "/dev/disk/by-label/J";
fsType = "ext4";
options = ["nofail"];
};
services.nfs.server.enable = true;
services.nfs.server.exports = ''
/mnt/Inky/nfs 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)
'';
networking.firewall.allowedTCPPorts = [
80 #apache
2049 #nfs
];
}

@ -0,0 +1,61 @@
{ pkgs, ... }:
{
services.postgresql = {
enable = true;
dataDir = "/mnt/Inky/postgresql/";
};
services.nextcloud = {
enable = true;
datadir = "/mnt/Inky/nc_data";
hostName = "nc.kindrobot.ca";
https = true;
config = {
dbtype = "pgsql";
dbpassFile = "/var/nextcloud-secrets/db_password.txt";
adminuser = "admin";
adminpassFile = "/var/nextcloud-secrets/admin_password.txt";
overwriteProtocol = "https";
};
};
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
};
# nfs setup
fileSystems."/mnt/Gabriel" = {
device = "/dev/disk/by-label/Gabriel";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Henry" = {
device = "/dev/disk/by-label/Henry";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Isabela" = {
device = "/dev/disk/by-label/Isabela";
fsType = "exfat";
options = ["nofail"];
};
fileSystems."/mnt/Inky" = {
device = "/dev/disk/by-label/Inky";
fsType = "ext4";
options = ["nofail"];
};
fileSystems."/mnt/J" = {
device = "/dev/disk/by-label/J";
fsType = "ext4";
options = ["nofail"];
};
services.nfs.server.enable = true;
services.nfs.server.exports = ''
/mnt/Inky/nfs 192.168.1.0/24(rw,sync,no_subtree_check,no_root_squash)
'';
networking.firewall.allowedTCPPorts = [
8080 #nginx / nextcloud
2049 #nfs
];
services.nginx.virtualHosts."nc.kindrobot.ca".listen = [ { addr = "0.0.0.0"; port = 8080; } ];
}

@ -19,6 +19,7 @@
./box/tacotuesday.nix
./app/k3s.nix
./conf/1710_k8s.nix
./conf/nextcloud_and_nfs.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

Loading…
Cancel
Save