forked from kalipso/infrastructure
Compare commits
5 Commits
cc5701a3b9
...
fileserver
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a667c8bdc | ||
|
|
705d895f0e | ||
|
|
cfc023f9b1 | ||
|
|
1201f0fc53 | ||
| 98a79d708a |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
|||||||
*.log
|
*.log
|
||||||
result
|
result
|
||||||
*.qcow2
|
*.qcow2
|
||||||
|
.direnv/
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ in
|
|||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
../modules/malobeo_user.nix
|
../modules/malobeo_user.nix
|
||||||
|
./file_server.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sops.defaultSopsFile = ./secrets.yaml;
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
|
|||||||
36
machines/lucia/file_server.nix
Normal file
36
machines/lucia/file_server.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
#automount mit udisks2
|
||||||
|
#siehe udevadm monitor
|
||||||
|
#bash-script?
|
||||||
|
#user-oder root mount
|
||||||
|
#systemd-automount villeicht
|
||||||
|
fileSystems = {
|
||||||
|
"/mnt/extHdd0" = { #statisches mounten ist am einfachsten aber kein hotplug möglich
|
||||||
|
device = "/dev/disk/by-uuid/"; #noch ausfüllen
|
||||||
|
fsType = "ext4"; #zfs wäre hier cool
|
||||||
|
options = [ "users" "nofail" ];
|
||||||
|
};
|
||||||
|
"/exports/extHdd0" = {
|
||||||
|
device = "/mnt/extHdd0";
|
||||||
|
fsType = "none";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups = { nfs = {gid = 1003; }; }; #erstelle nfs user und gruppe für isolation
|
||||||
|
users.users.nfs = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "nfs";
|
||||||
|
uid = 1003;
|
||||||
|
};
|
||||||
|
users.users.malobeo.extraGroups = [ "nfs" ];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [ "d /export 0775 nfs nfs -" ]; #erstelle nfs ordner
|
||||||
|
|
||||||
|
services.nfs.server = {
|
||||||
|
enable = true;
|
||||||
|
exports = ''
|
||||||
|
/export 192.168.1.0/24(ro, nohide, no_subtree_check, async, all_squash, anonuid=1003, anongid=1003)
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
networking.firewall.allowedTCPPorts = [ 2049 ]; #wir benutzen NfsV4 hoffentlich
|
||||||
|
}
|
||||||
@@ -100,11 +100,12 @@ in
|
|||||||
nix = {
|
nix = {
|
||||||
# Show a diff when activating a new system except for microvms which handle this seperately
|
# Show a diff when activating a new system except for microvms which handle this seperately
|
||||||
#diffSystem = config.malobeo.deployment.server or "" == "";
|
#diffSystem = config.malobeo.deployment.server or "" == "";
|
||||||
gc = lib.mkIf config.malobeo.autoUpdate.enable {
|
#TODO: THIS WIPES HOSTS NIX STORE FROM WITHIN NIXOS-CONTAINER
|
||||||
automatic = true;
|
#gc = lib.mkIf config.malobeo.autoUpdate.enable {
|
||||||
randomizedDelaySec = "6h";
|
# automatic = true;
|
||||||
options = "--delete-older-than 21d";
|
# randomizedDelaySec = "6h";
|
||||||
};
|
# options = "--delete-older-than 21d";
|
||||||
|
#};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ (
|
environment.systemPackages = [ (
|
||||||
|
|||||||
Reference in New Issue
Block a user