Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions hosts/servers/rainbowdash.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{ pkgs, lib, config, ... }:

{
imports = [ ../../hardware/virtualized.nix ];

networking.hostName = "rainbowdash";

ocf.network = {
enable = true;
lastOctet = 129;
};

ocf.nfs = {
enable = true;
mountHome = true;
mountServices = true;
};

environment.systemPackages = with pkgs; [
ocf-utils
openldap
ldapvi
ipmitool
];

system.stateVersion = "25.05";
}
38 changes: 38 additions & 0 deletions modules/nfs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs, lib, config, ... }:

let
cfg = config.ocf.nfs;
in
{
options.ocf.nfs = {
enable = lib.mkEnableOption "Enable NFS Mounts";

mountHome = lib.mkOption {
type = lib.types.bool;
description = "Mount /home from NFS.";
default = false;
};

mountServices = lib.mkOption {
type = lib.types.bool;
description = "Mount /services from NFS.";
default = false;
};
};

config = lib.mkIf cfg.enable {
boot.supportedFilesystems = [ "nfs" ];

fileSystems."/home" = lib.mkIf cfg.mountHome {
device = "homes:/home";
fsType = "nfs4";
options = [ "rw" "bg" "noatime" "nodev" "nosuid" ];
};

fileSystems."/services" = lib.mkIf cfg.mountHome {
device = "services:/services";
fsType = "nfs4";
options = [ "rw" "bg" "noatime" "nodev" "nosuid" ];
};
};
}
1 change: 1 addition & 0 deletions secrets/host-keys/rainbowdash.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuA9ZE0li8vj6YAzJS5wE2grmjMeMcYmbZqVJJNEFxQ root@rainbowdash
Loading