forked from rarias/jungle
Compare commits
2 Commits
add-tent-m
...
m/raccoon
| Author | SHA1 | Date | |
|---|---|---|---|
| 49e074965c | |||
| 0c6fdc9183 |
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -37,34 +37,9 @@
|
|||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.swraid = {
|
programs.ssh.extraConfig = ''
|
||||||
enable = true;
|
Host hut
|
||||||
mdadmConf = ''
|
ProxyJump ssfhead
|
||||||
DEVICE partitions
|
HostName xeon07
|
||||||
ARRAY /dev/md0 metadata=1.2 UUID=496db1e2:056a92aa:a544543f:40db379d
|
'';
|
||||||
MAILADDR root
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/vault" = {
|
|
||||||
device = "/dev/disk/by-label/vault";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Make a /vault/$USER directory for each user.
|
|
||||||
systemd.services.create-vault-dirs = let
|
|
||||||
# Take only normal users in tent
|
|
||||||
users = lib.filterAttrs (_: v: v.isNormalUser) config.users.users;
|
|
||||||
commands = lib.concatLists (lib.mapAttrsToList
|
|
||||||
(_: user: [
|
|
||||||
"install -d -o ${user.name} -g ${user.group} -m 0711 /vault/${user.name}"
|
|
||||||
]) users);
|
|
||||||
script = pkgs.writeShellScript "create-vault-dirs.sh" (lib.concatLines commands);
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
wants = [ "local-fs.target" ];
|
|
||||||
after = [ "local-fs.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig.ExecStart = script;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user