-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkobudai.nix
More file actions
121 lines (113 loc) · 2.7 KB
/
Copy pathkobudai.nix
File metadata and controls
121 lines (113 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
{
ocf.network = {
enable = true;
bond.enable = true;
lastOctet = 6;
};
ocf.nfs-export = {
enable = true;
# https://github.com/ocf/puppet/blob/a081b2210691bd46d585accc8548c985188486a0/modules/ocf_filehost/manifests/init.pp#L10-L16
exports."/opt/homes" = [
{
hosts = [
"admin"
"www"
"ssh"
"apphost"
"adenine"
"guanine"
"cytosine"
"thymine"
"tsunami"
"supernova"
];
options = [
"rw"
"fsid=0"
"no_subtree_check"
"no_root_squash"
];
}
{
hosts = [ "*.ocf.berkeley.edu" ];
options = [
"rw"
"fsid=0"
"no_subtree_check"
"root_squash"
"sec=krb5p"
];
}
];
};
# FIXME remove and make sure it still boots
hardware.enableAllHardware = true;
disko.devices = {
disk = {
main = {
device = "/dev/disk/by-id/ata-Samsung_SSD_850_PRO_1TB_S252NXAGA05227F";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
boot.swraid = {
enable = true;
mdadmConf = ''
MAILADDR root@ocf.berkeley.edu
ARRAY /dev/md/nfs metadata=1.2 UUID=46b10914:9f84099b:dd54304a:917d7898
'';
};
fileSystems = {
"/opt/homes" = {
device = "/dev/md/nfs";
fsType = "ext4";
options = [
"noatime"
"nodev"
"usrquota"
];
};
# Bind mount /opt/homes/home to /home. This allows running (for NFSv3)
# mount kobudai:/home /home
# In fact, since homes is CNAMEd to kobudai, even
# mount homes:/home /home
# works and that's what the Puppet config in modules/ocf/manifests/nfs.pp does.
# This also means that your home on the filehost when you login to it is
# the shared NFS home.
"/home" = {
device = "/opt/homes/home";
fsType = "none";
options = [ "bind" ];
};
"/services" = {
device = "/opt/homes/services";
fsType = "none";
options = [ "bind" ];
};
};
nixpkgs.hostPlatform = "x86_64-linux";
system.stateVersion = "25.11";
}