Archived
76 lines
3.0 KiB
Nix
76 lines
3.0 KiB
Nix
# Edit this configuration file to define what should be installed on
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
{ config, lib, pkgs, inputs,... }:
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan.
|
|
../../common/configuration.nix
|
|
../../modules/nix-cache/client.nix
|
|
../../modules/remote-builder-client.nix
|
|
../../modules/beszel/enable-agent.nix
|
|
../../modules/services/enable-rpcbind.nix
|
|
../../modules/services/zfs/enable-service.nix
|
|
# ../../modules/services/zfs/auto-mount-volumes.nix
|
|
];
|
|
|
|
|
|
networking.hostName = "server"; # Define your hostname.
|
|
networking.hostId = "6689f93e";
|
|
|
|
boot.zfs.extraPools = [ "tank" ];
|
|
|
|
services.beszel.agent.environment = {
|
|
#DOCKER_HOST = "tcp://docker-socket-proxy:2375";
|
|
#HUB_URL = "http://docker.sweet.home:8090";
|
|
KEY = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFPR9kwtC4TAeTRu46A7+opZsYpxqkRJ+x/ZyB2GWCeG";
|
|
TOKEN = "48e71783-35df-4ea0-a8c2-05bc5e020d2e";
|
|
EXTRA_FILESYSTEMS="/tank";
|
|
};
|
|
|
|
|
|
systemd.services.nfs-server = {
|
|
after = [ "zfs-mount.service" ];
|
|
requires = [ "zfs-mount.service" ];
|
|
};
|
|
|
|
services.nfs.server = {
|
|
enable = true;
|
|
exports = ''
|
|
/tank/docker/config 192.168.2.0/24(rw,sync,no_subtree_check,no_root_squash)
|
|
/tank/docker/volumes 192.168.2.0/24(rw,sync,no_subtree_check,no_root_squash)
|
|
/tank/docker/databases 192.168.2.0/24(rw,sync,no_subtree_check,no_root_squash)
|
|
/tank/docker/nextcloud-data 192.168.2.0/24(rw,sync,no_subtree_check,no_root_squash)
|
|
/tank/raspi/volumes 192.168.2.0/24(rw,sync,no_subtree_check,no_root_squash)
|
|
'';
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 111 2049 ];
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
# accidentally delete configuration.nix.
|
|
# system.copySystemConfiguration = true;
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
#
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
#
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
# to actually do that.
|
|
#
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
# out of date, out of support, or vulnerable.
|
|
#
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
# and migrated your data accordingly.
|
|
#
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.sta>
|
|
system.stateVersion = "25.05"; # Did you read the comment?
|
|
}
|